Sequel の Migrations に問題があり、別の目を使うことができます。問題ないように見える移行を実行していますが、テーブルが作成されていません。schema_info テーブルが作成されていることがわかるので、間違いなく接続しています。-M 0/1 は、期待どおりにバージョンを変更しますが、まだテーブルはありません。
コマンド:
sequel -m . -M 1 ~/Desktop/dbtest/testdb.yml
001_testdb.rb:
class TestDb < Sequel::Migration
def up
create_table( "terminals") do
primary_key :id
Integer :location_id
Integer :merchant_id
BigDecimal :terminal_id, :size=>[11, 0]
String :reference, :size=>255
DateTime :created_at
DateTime :updated_at
String :image, :default=>"default.jpg", :size=>255
end
end
def down
drop_table :terminals
end
end
Postgres での出力:
test_db=# \dt
List of relations
Schema | Name | Type | Owner
--------+-------------+-------+----------
public | schema_info | table | postgres
(1 row)
test_db=# select * from schema_info;
version
---------
1
(1 row)