Class: ObjectSetup
- Inherits:
-
Sequel::Migration
- Object
- Sequel::Migration
- ObjectSetup
- Defined in:
- lib/runtime/object.rb
Overview
The ObjectSetup 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/runtime/object.rb', line 45 def down drop_table?(:object, cascade: true) end |
#up ⇒ Object
rubocop: disable Metrics/MethodLength
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/runtime/object.rb', line 27 def up create_table? :object do primary_key :id foreign_key :parent_id, :object, on_delete: :set_null index :name index :created_at String :name, text: true String :short_name, text: true String :description, text: true String :object_type, null: false String :properties, text: true, default: {}.to_yaml.strip DateTime :created_at DateTime :modified_at end end |