This project is archived and is in readonly mode.
MySQL adapter should not dump views as create table statements for db:schema:dump
-
Gavin Stark
Here is a patch against rails master @ c6850d8361bbf288cf3adefd087cb9a4bc9c97bc
-
Gavin Stark
The bugmash instructions (for the Jan 2010 bugmash) state I should say: I've attached a patch. The patch "mysql_dumper_not_include_views.diff" is for Rails 2.3 and "mysql_dont_dump_views_as_tables_30_master.patch" is against master (3.0pre) at the commit noted above.
-
Gavin Stark
The patch mysql_dont_dump_views_as_tables_30_master.patch still passes all tests on rails master @ 3436fdfc12d58925e3d981e0afa61084ea34736c
-
Santiago Pastorino
- State changed from new to open
- Importance changed from to
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino
- State changed from open to stale
-
Daniel
Could we reopen it as "still a problem" now that I'm commenting on it? I just got bit by this problem in 2.3.11.
-
Gavin Stark
I have reimplemented the patch (with a test) against rails 3.0 master at 445241
-
Gavin Stark
Daniel, I have "worked around" my patch not being in ActiveRecord by creating config/initializers/schema_dumper.rb with:
# We name all our views beginning with 'view_' and they can be excluded from the schema dump ActiveRecord::SchemaDumper.ignore_tables = [/view_.+/]If you keep a naming scheme for views, this will help.
-
barrye (at gmail)
+1 This is a real problem.
-
Daniel
Thanks for the update, Gavin. I discovered the rails_sql_views gem, which is part of the ActiveWarehouse project, and it includes a fix for this problem as well. Here's a link:
http://activewarehouse.rubyforge.org/rails_sql_views/
Hopefully the Rails team will address this problem soon.
