Class: UseUnprefixedCmsTables
- Inherits:
-
Object
- Object
- UseUnprefixedCmsTables
- Defined in:
- lib/generators/ruby_cms/templates/db/migrate/20260212000001_use_unprefixed_cms_tables.rb
Overview
Ensures CMS uses unprefixed table names (preferences, content_blocks, permissions, user_permissions, visitor_errors). Creates tables only if they don't exist so host apps with existing tables are not overwritten. Adds missing columns when tables exist.
Instance Method Summary collapse
Instance Method Details
#down ⇒ Object
17 18 19 |
# File 'lib/generators/ruby_cms/templates/db/migrate/20260212000001_use_unprefixed_cms_tables.rb', line 17 def down # No-op: leave unprefixed tables in place; host app may rely on them. end |
#up ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/generators/ruby_cms/templates/db/migrate/20260212000001_use_unprefixed_cms_tables.rb', line 7 def up create_preferences_if_missing ensure_content_blocks_table ensure_content_blocks_columns ensure_visitor_errors_table ensure_visitor_errors_columns end |