In 1.2 there is a builtin Schema shell (console app) that can manage things like ALTER statements that need to be run on a db between runs. To my knowledge it doesn't insert records. From a prompt cd into cake/ console and try cake schema help. That will give you a list of commands supported by the SchemaShell.
-Mark On Sep 29, 1:23 pm, forrestgump <[EMAIL PROTECTED]> wrote: > Built in schema shells?....i dont follow...can u elaborate on that? > > On Sep 29, 6:38 pm, mark_story <[EMAIL PROTECTED]> wrote: > > > Couldn't you use the builtin Schema shell to do your migrations? and > > not have to muck with YAML? > > > -Mark > > > On Sep 29, 3:13 am, forrestgump <[EMAIL PROTECTED]> wrote: > > > > OK i made some changed to the code as follows.... > > > UP: > > > create_table: > > > users: > > > username: > > > type: varchar > > > length: 100 > > > index: true > > > password: > > > type: varchar > > > length: 100 > > > > query: > > > users: INSERT INTO users SET username = 'admin' and password= > > > 'admin' > > > > DOWN: > > > query: > > > users: DELETE FROM users WHERE username = 'admin' and password= > > > 'admin' > > > drop_table: users > > > > It has successfully created the users table and the collumns i > > > require, including two additional ones i dont require(created, > > > modified).... > > > yet no data was inserted....where am i going wrong? > > > > On Sep 29, 12:00 pm, forrestgump <[EMAIL PROTECTED]> wrote: > > > > > 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---