Class: ModularizedSetup
- Inherits:
-
Sequel::Migration
- Object
- Sequel::Migration
- ModularizedSetup
- Defined in:
- lib/runtime/module.rb
Overview
The ModularizedSetup class
Instance Method Summary collapse
Methods inherited from Sequel::Migration
Instance Method Details
#down ⇒ Object
113 114 115 |
# File 'lib/runtime/module.rb', line 113 def down drop_table(:modularized, cascade: true) if table_exists? :modularized end |
#up ⇒ Object
105 106 107 108 109 110 111 |
# File 'lib/runtime/module.rb', line 105 def up create_table? :modularized do primary_key :id foreign_key :object_id, :object, on_delete: :cascade foreign_key :module_id, :module, on_delete: :cascade end end |