Class: LinkSetup
- Inherits:
-
Sequel::Migration
- #Object
- Object
- Sequel::Migration
- LinkSetup
- Defined in:
- lib/story_teller/inform/relational/link.rb
Overview
The LinkSetup class
Instance Method Summary collapse
-
#down ⇒ Object
rubocop: enable Metrics/MethodLength.
-
#up ⇒ Object
rubocop: disable Metrics/MethodLength.
Methods inherited from Sequel::Migration
Instance Method Details
#down ⇒ Object
rubocop: enable Metrics/MethodLength
45 46 47 |
# File 'lib/story_teller/inform/relational/link.rb', line 45 def down drop_table :link if table_exists? :link end |
#up ⇒ Object
rubocop: disable Metrics/MethodLength
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/story_teller/inform/relational/link.rb', line 28 def up # return if table_exists? :link log.debug "#up" create_table? :link do primary_key :id foreign_key :from_id, :object, on_delete: :cascade foreign_key :to_id, :object, on_delete: :cascade index :name index :created_at String :name DateTime :created_at DateTime :modified_at end end |