Monday, September 29, 2008

help with YAML pls basic syntax...etc

Can someone tell me what is wrong with the following YAML code ? \

UP:
create_table:
users:
id:
type: integer
length: 11
primary: true
autoincrement: true
username:
type: varchar
length: 100
index: true
password:
type: varchar
length: 100

query:
users: INSERT INTO users SET username = 'admin' and password=
'admin'


DOWN:
drop_table: users
query:
users: DELETE FROM users WHERE username = 'admin' and password=
'admin'

what i want it to do is, create a table users with fields
[id,username,password] and then insert data into it
[0,admin,admin]....wht YAML is doing for me is...
it create a table users with fields [id,created,modified] and another
table autoincrement with fields [id,username,password] , and nothing
gets inserted....

I would really appreciate some help ive been stuck on this since 2
days....im writing a short tutorial on cakephp migrations that i wish
to share....and this will really help...

Forrestgump
(yes i know very original nick name :) )
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: