Class: ReeMigrator::CreateMigrationsTable
- Inherits:
-
Object
- Object
- ReeMigrator::CreateMigrationsTable
- Includes:
- Ree::FnDSL
- Defined in:
- lib/ree_lib/packages/ree_migrator/package/ree_migrator/functions/create_migrations_table.rb
Instance Method Summary collapse
Instance Method Details
#call(connection) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/ree_lib/packages/ree_migrator/package/ree_migrator/functions/create_migrations_table.rb', line 16 def call(connection) if !connection.tables.include?(:migrations) connection.create_table :migrations do primary_key :id column :filename, "varchar(1024)", null: false column :created_at, DateTime, null: false column :type, "varchar(16)", null: false end end nil end |
#setup ⇒ Object
11 12 13 |
# File 'lib/ree_lib/packages/ree_migrator/package/ree_migrator/functions/create_migrations_table.rb', line 11 def setup Sequel.extension(:migration) end |