RichardOnRails
2010-Feb-23 23:47 UTC
rake db:create:all creates databases but doesn''t create their tables
Hi All, I''m stilling running: WinXP-Pro/SP3 Rails 2.3.5 MySQL 5.0.37-community-nt I have exhaustively tested MySQLd server using the MySQL monitor by: Creating a database Creating a table with columns Populating a table with a row Dropping a table Dropping databases I check that a migration I created days ago is still populated correctly. All I get from rake db;create:all is, consistent with database.yml: empty tables if they do not already exist announcements/warnings if the tables already exist (without recreating them so that populated tables maintain whatever definitions/data that they had) Does anyone know whether the software connecting Rails 2.3.5 to MySQL 5.0.37 really works as intended? Or can anyone recommend a configuration that is known to work? Thanks in Advance, Richard -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Charles A. Lopez
2010-Feb-24 00:04 UTC
Re: rake db:create:all creates databases but doesn''t create their tables
what are you expecting to happen that isn''t happening? On 23 February 2010 18:47, RichardOnRails < RichardDummyMailbox58407-gP6xRNRnnqSxhq/XJNNIW0EOCMrvLtNR@public.gmane.org> wrote:> Hi All, > > I''m stilling running: > WinXP-Pro/SP3 > Rails 2.3.5 > MySQL 5.0.37-community-nt > > I have exhaustively tested MySQLd server using the MySQL monitor by: > Creating a database > Creating a table with columns > Populating a table with a row > Dropping a table > Dropping databases > > I check that a migration I created days ago is still populated > correctly. > > All I get from rake db;create:all is, consistent with database.yml: > empty tables if they do not already exist > announcements/warnings if the tables already exist (without recreating > them so that populated tables maintain whatever definitions/data that > they had) > > Does anyone know whether the software connecting Rails 2.3.5 to MySQL > 5.0.37 really works as intended? Or can anyone recommend a > configuration that is known to work? > > Thanks in Advance, > Richard > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- Charles A. Lopez charlesalopez-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org What''s your vision for your organization? What''s your biggest challenge? Let''s talk. (IBM Partner) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Steve Rowley
2010-Feb-24 02:23 UTC
Re: rake db:create:all creates databases but doesn''t create their tables
> All I get from rake db;create:all is, consistent with database.yml: > empty tables if they do not already exist > announcements/warnings if the tables already exist (without recreating > them so that populated tables maintain whatever definitions/data that > they had)Hi Richard - it''s possible I misunderstand the question, but judging from the title of your post, could the problem be that you are creating the database but aren''t running the migrations to create the tables? rake db:create:all creates the development, test and production databases on the server, akin to the executing SQL DDL like "CREATE DATABASE xxx." This wouldn''t create any tables. To actually create the tables defined in your migrations (or create indexes, or alter the tables, or any of the other stuff you define in migrations), you would run: rake db:migrate which executes any migrations that haven''t already been run already in the current default environment database (say, development if you are working in development), akin to executing SQL like "CREATE TABLE xxx" or "ALTER TABLE", etc. This of course assumes you have generated some migrations (it sounds like you have). -Steve -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
RichardOnRails
2010-Feb-24 03:55 UTC
Re: rake db:create:all creates databases but doesn''t create their tables
> rake db:migrateThat did it!!!! I''ve been racking my brains over this for two, just because I want to adopt what I feel are "best practices". You''ve rescued me from an embarrassing ordeal. Thank you very much for your insight Steve. - Richard On Feb 23, 9:23 pm, Steve Rowley <srow...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > All I get from rake db;create:all is, consistent with database.yml: > > empty tables if they do not already exist > > announcements/warnings if the tables already exist (without recreating > > them so that populated tables maintain whatever definitions/data that > > they had) > > Hi Richard - it''s possible I misunderstand the question, but judging > from the title of your post, could the problem be that you are > creating the database but aren''t running the migrations to create the > tables? > > rake db:create:all > > creates the development, test and production databases on the server, > akin to the executing SQL DDL like "CREATE DATABASE xxx." This > wouldn''t create any tables. > > To actually create the tables defined in your migrations (or create > indexes, or alter the tables, or any of the other stuff you define in > migrations), you would run: > > rake db:migrate > > which executes any migrations that haven''t already been run already in > the current default environment database (say, development if you are > working in development), akin to executing SQL like "CREATE TABLE xxx" > or "ALTER TABLE", etc. This of course assumes you have generated some > migrations (it sounds like you have). > > -Steve-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
RichardOnRails
2010-Feb-24 15:41 UTC
Re: rake db:create:all creates databases but doesn''t create their tables
Hi Charles, Check out my reply to Steve Rowley and my original post on this thread. Best wishes, Richard On Feb 23, 7:04 pm, "Charles A. Lopez" <charlesalo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> what are you expecting to happen that isn''t happening? > > On 23 February 2010 18:47, RichardOnRails < > > > > RichardDummyMailbox58...-gP6xRNRnnqSxhq/XJNNIW0EOCMrvLtNR@public.gmane.org> wrote: > > Hi All, > > > I''m stilling running: > > WinXP-Pro/SP3 > > Rails 2.3.5 > > MySQL 5.0.37-community-nt > > > I have exhaustively tested MySQLd server using the MySQL monitor by: > > Creating a database > > Creating a table with columns > > Populating a table with a row > > Dropping a table > > Dropping databases > > > I check that a migration I created days ago is still populated > > correctly. > > > All I get from rake db;create:all is, consistent with database.yml: > > empty tables if they do not already exist > > announcements/warnings if the tables already exist (without recreating > > them so that populated tables maintain whatever definitions/data that > > they had) > > > Does anyone know whether the software connecting Rails 2.3.5 to MySQL > > 5.0.37 really works as intended? Or can anyone recommend a > > configuration that is known to work? > > > Thanks in Advance, > > Richard > > > -- > > You received this message because you are subscribed to the Google Groups > > "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > > . > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- > Charles A. Lopez > charlesalo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > What''s your vision for your organization? > What''s your biggest challenge? > > Let''s talk. > (IBM Partner)-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.