codeforamerica / schoolselection

Rails app that displays public school information for parents
http://discoverbps.org/schools?utf8=%E2%9C%93&view=list&address=23+marlborough+st&zipcode=02117&grade_level=K0&sibling_school=&commit=Search
17 stars 15 forks source link

migration tries to drop tables that don't exist in a clean DB #1

Open YenTheFirst opened 12 years ago

YenTheFirst commented 12 years ago

https://github.com/codeforamerica/schoolselection/blob/master/db/migrate/20111009042810_remove_legacy_database_tables.rb

joelmahoney commented 12 years ago

Some of these have definitely been removed (e.g. mail_clusters). You should look at the recent, relevantly named migrations. Not sure why or where these tables are showing up for you. On Nov 1, 2011 4:03 PM, "T S" < reply@reply.github.com> wrote:

https://github.com/codeforamerica/schoolselection/blob/master/db/migrate/20111009042810_remove_legacy_database_tables.rb

Reply to this email directly or view it on GitHub: https://github.com/codeforamerica/schoolselection/issues/1

YenTheFirst commented 12 years ago

they're NOT showing up, that's the problem.

starting from a fresh database, and migrating, these tables are never created, but this migration tries to drop them, causing it to fail.

joelmahoney commented 12 years ago

I think it's because 'rails destroy scaffold' nukes migrations, too. I guess we should remove the drop statements from the later migrations.

On Nov 2, 2011, at 8:55 AM, T S wrote:

they're NOT showing up, that's the problem.

starting from a fresh database, and migrating, these tables are never created, but this migration tries to drop them, causing it to fail.

Reply to this email directly or view it on GitHub: https://github.com/codeforamerica/schoolselection/issues/1#issuecomment-2605187

lovehandle commented 12 years ago

I believe it's considered standard practice to load the schema prior to running migrations, and this issue does not seem to occur when migrations are run after the schema has been loaded. Perhaps the drop statements should still be removed, but it seems like a non-issue imo.

The above commit updates the README to show loading the schema as part of the installation process.