Re: 'schema generate' and different connections (was: help with YAML pls basic syntax...etc)

2008-11-03 Thread David Zentgraf

So, could somebody please, pretty please, post a solution to this
ticket if there is one, or reinstate it as a bug?

https://trac.cakephp.org/ticket/5502
"I have exactly the same problem, multiple databases, and no way to
generate the schema for each one of them."

Thanks,
Dav

On Oct 1, 12:01 pm, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
> Hi Mark,
>
> Schema seems to want to schemify all models using the same connection,  
> the one it automatically defaults to or the one that was specified,  
> ignoring the $useDbConfig setting in the model itself. Opened a ticket  
> for it:https://trac.cakephp.org/ticket/5502
>
> Chrs,
> Dav
>
> On 30 Sep 2008, at 23:22, mark_story wrote:
>
>
>
> > David,
>
> > So you have different models using different connections, and when
> > specifying a -connection
> > the shell is attempting to schem-ify models not using that connection?
>
> > If that is the case please open a ticket, with some examples on how to
> > reproduce it.
>
> > -Mark
>
> > On Sep 30, 1:53 am, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
> >> Speaking of which...
>
> >> I have multiple connections in my database.conf. Running a 'cake
> >> schema generate' always quits with "Error: Missing database table 'x'
> >> for model 'y'". Even doing 'schema -connection alt -name Model
> >> generate' quits with the same message. Depending on which '-
> >> connection' I specify it quits on different models, so it seems it
> >> always tries to generate schemas for all models, ignoring my flags.
>
> >> Am I misusing the schema shell or should I open a ticket?
>
> >> Chrs,
> >> Dav
>
> >> On 30 Sep 2008, at 05:03, mark_story wrote:
>
> >>> 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
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: 'schema generate' and different connections (was: help with YAML pls basic syntax...etc)

2008-10-01 Thread techiguy

Dear forrestgump,

u can do 2,3,4 things which u mentioned using schema.php file

except that u cannot insert data from a schema file i.e the default
data into the table.

other than that every thing will work fine

On Oct 1, 10:01 am, forrestgump <[EMAIL PROTECTED]> wrote:
> Hey,
>  So ive been messing around with cake schema for 2 days and i learnt y
> i dont like it.
>
> 1)it doesnt let u insert data
> 2) it does not let you rollback
> 3)there is no way u can save ur queries and run them up anytime u feel
> like with a simple command
> 4)all of the above makes team-development a pain in the a**
>
> I would recommend migrationsand i would still like someone to tell
> me the correct way to insert data using yaml
>
> Forrestgumphttp://techcrate.wordpress.com/2008/09/29/hello-world/
>
> On Oct 1, 8:01 am, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi Mark,
>
> > Schema seems to want to schemify all models using the same connection,  
> > the one it automatically defaults to or the one that was specified,  
> > ignoring the $useDbConfig setting in the model itself. Opened a ticket  
> > for it:https://trac.cakephp.org/ticket/5502
>
> > Chrs,
> > Dav
>
> > On 30 Sep 2008, at 23:22, mark_story wrote:
>
> > > David,
>
> > > So you have different models using different connections, and when
> > > specifying a -connection
> > > the shell is attempting to schem-ify models not using that connection?
>
> > > If that is the case please open a ticket, with some examples on how to
> > > reproduce it.
>
> > > -Mark
>
> > > On Sep 30, 1:53 am, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
> > >> Speaking of which...
>
> > >> I have multiple connections in my database.conf. Running a 'cake
> > >> schema generate' always quits with "Error: Missing database table 'x'
> > >> for model 'y'". Even doing 'schema -connection alt -name Model
> > >> generate' quits with the same message. Depending on which '-
> > >> connection' I specify it quits on different models, so it seems it
> > >> always tries to generate schemas for all models, ignoring my flags.
>
> > >> Am I misusing the schema shell or should I open a ticket?
>
> > >> Chrs,
> > >> Dav
>
> > >> On 30 Sep 2008, at 05:03, mark_story wrote:
>
> > >>> 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- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: 'schema generate' and different connections (was: help with YAML pls basic syntax...etc)

2008-10-01 Thread David C. Zentgraf

Hi Mark,

Schema seems to want to schemify all models using the same connection,  
the one it automatically defaults to or the one that was specified,  
ignoring the $useDbConfig setting in the model itself. Opened a ticket  
for it: https://trac.cakephp.org/ticket/5502

Chrs,
Dav

On 30 Sep 2008, at 23:22, mark_story wrote:

>
> David,
>
> So you have different models using different connections, and when
> specifying a -connection
> the shell is attempting to schem-ify models not using that connection?
>
> If that is the case please open a ticket, with some examples on how to
> reproduce it.
>
> -Mark
>
> On Sep 30, 1:53 am, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
>> Speaking of which...
>>
>> I have multiple connections in my database.conf. Running a 'cake
>> schema generate' always quits with "Error: Missing database table 'x'
>> for model 'y'". Even doing 'schema -connection alt -name Model
>> generate' quits with the same message. Depending on which '-
>> connection' I specify it quits on different models, so it seems it
>> always tries to generate schemas for all models, ignoring my flags.
>>
>> Am I misusing the schema shell or should I open a ticket?
>>
>> Chrs,
>> Dav
>>
>> On 30 Sep 2008, at 05:03, mark_story wrote:
>>
>>> 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
> >


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: 'schema generate' and different connections (was: help with YAML pls basic syntax...etc)

2008-10-01 Thread forrestgump

what do u know ...got insert working after all, after a friend of mine
showed me my stupidityhere is the update:
UP:
  create_table:
users:
  username:
type: varchar
length: 100
index: true
  password:
type: varchar
length: 100

  query:
users: INSERT INTO users (username,password)
values('admin','admin')

DOWN:
  drop_table: users

slick :)

On Oct 1, 10:01 am, forrestgump <[EMAIL PROTECTED]> wrote:
> Hey,
>  So ive been messing around with cake schema for 2 days and i learnt y
> i dont like it.
>
> 1)it doesnt let u insert data
> 2) it does not let you rollback
> 3)there is no way u can save ur queries and run them up anytime u feel
> like with a simple command
> 4)all of the above makes team-development a pain in the a**
>
> I would recommend migrationsand i would still like someone to tell
> me the correct way to insert data using yaml
>
> Forrestgumphttp://techcrate.wordpress.com/2008/09/29/hello-world/
>
> On Oct 1, 8:01 am, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
>
> > Hi Mark,
>
> > Schema seems to want to schemify all models using the same connection,  
> > the one it automatically defaults to or the one that was specified,  
> > ignoring the $useDbConfig setting in the model itself. Opened a ticket  
> > for it:https://trac.cakephp.org/ticket/5502
>
> > Chrs,
> > Dav
>
> > On 30 Sep 2008, at 23:22, mark_story wrote:
>
> > > David,
>
> > > So you have different models using different connections, and when
> > > specifying a -connection
> > > the shell is attempting to schem-ify models not using that connection?
>
> > > If that is the case please open a ticket, with some examples on how to
> > > reproduce it.
>
> > > -Mark
>
> > > On Sep 30, 1:53 am, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
> > >> Speaking of which...
>
> > >> I have multiple connections in my database.conf. Running a 'cake
> > >> schema generate' always quits with "Error: Missing database table 'x'
> > >> for model 'y'". Even doing 'schema -connection alt -name Model
> > >> generate' quits with the same message. Depending on which '-
> > >> connection' I specify it quits on different models, so it seems it
> > >> always tries to generate schemas for all models, ignoring my flags.
>
> > >> Am I misusing the schema shell or should I open a ticket?
>
> > >> Chrs,
> > >> Dav
>
> > >> On 30 Sep 2008, at 05:03, mark_story wrote:
>
> > >>> 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
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: 'schema generate' and different connections (was: help with YAML pls basic syntax...etc)

2008-09-30 Thread forrestgump

Hey,
 So ive been messing around with cake schema for 2 days and i learnt y
i dont like it.

1)it doesnt let u insert data
2) it does not let you rollback
3)there is no way u can save ur queries and run them up anytime u feel
like with a simple command
4)all of the above makes team-development a pain in the a**

I would recommend migrationsand i would still like someone to tell
me the correct way to insert data using yaml

Forrestgump
http://techcrate.wordpress.com/2008/09/29/hello-world/


On Oct 1, 8:01 am, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
> Hi Mark,
>
> Schema seems to want to schemify all models using the same connection,  
> the one it automatically defaults to or the one that was specified,  
> ignoring the $useDbConfig setting in the model itself. Opened a ticket  
> for it:https://trac.cakephp.org/ticket/5502
>
> Chrs,
> Dav
>
> On 30 Sep 2008, at 23:22, mark_story wrote:
>
>
>
> > David,
>
> > So you have different models using different connections, and when
> > specifying a -connection
> > the shell is attempting to schem-ify models not using that connection?
>
> > If that is the case please open a ticket, with some examples on how to
> > reproduce it.
>
> > -Mark
>
> > On Sep 30, 1:53 am, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
> >> Speaking of which...
>
> >> I have multiple connections in my database.conf. Running a 'cake
> >> schema generate' always quits with "Error: Missing database table 'x'
> >> for model 'y'". Even doing 'schema -connection alt -name Model
> >> generate' quits with the same message. Depending on which '-
> >> connection' I specify it quits on different models, so it seems it
> >> always tries to generate schemas for all models, ignoring my flags.
>
> >> Am I misusing the schema shell or should I open a ticket?
>
> >> Chrs,
> >> Dav
>
> >> On 30 Sep 2008, at 05:03, mark_story wrote:
>
> >>> 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
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: 'schema generate' and different connections (was: help with YAML pls basic syntax...etc)

2008-09-30 Thread mark_story

David,

So you have different models using different connections, and when
specifying a -connection
the shell is attempting to schem-ify models not using that connection?

If that is the case please open a ticket, with some examples on how to
reproduce it.

-Mark

On Sep 30, 1:53 am, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
> Speaking of which...
>
> I have multiple connections in my database.conf. Running a 'cake
> schema generate' always quits with "Error: Missing database table 'x'
> for model 'y'". Even doing 'schema -connection alt -name Model
> generate' quits with the same message. Depending on which '-
> connection' I specify it quits on different models, so it seems it
> always tries to generate schemas for all models, ignoring my flags.
>
> Am I misusing the schema shell or should I open a ticket?
>
> Chrs,
> Dav
>
> On 30 Sep 2008, at 05:03, mark_story wrote:
>
> > 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
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: 'schema generate' and different connections (was: help with YAML pls basic syntax...etc)

2008-09-30 Thread forrestgump

just in case someone is interested 
http://techcrate.wordpress.com/2008/09/29/hello-world/

On Sep 30, 10:53 am, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
> Speaking of which...
>
> I have multiple connections in my database.conf. Running a 'cake  
> schema generate' always quits with "Error: Missing database table 'x'  
> for model 'y'". Even doing 'schema -connection alt -name Model  
> generate' quits with the same message. Depending on which '-
> connection' I specify it quits on different models, so it seems it  
> always tries to generate schemas for all models, ignoring my flags.
>
> Am I misusing the schema shell or should I open a ticket?
>
> Chrs,
> Dav
>
> On 30 Sep 2008, at 05:03, mark_story wrote:
>
> > 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
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: 'schema generate' and different connections (was: help with YAML pls basic syntax...etc)

2008-09-29 Thread David C. Zentgraf

Speaking of which...

I have multiple connections in my database.conf. Running a 'cake  
schema generate' always quits with "Error: Missing database table 'x'  
for model 'y'". Even doing 'schema -connection alt -name Model  
generate' quits with the same message. Depending on which '- 
connection' I specify it quits on different models, so it seems it  
always tries to generate schemas for all models, ignoring my flags.

Am I misusing the schema shell or should I open a ticket?

Chrs,
Dav


On 30 Sep 2008, at 05:03, mark_story wrote:

> 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


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---