Перевод проекта на единую SQLite БД, WAL и обновление README для Windows
This commit is contained in:
16
config/db/migrate/20260303180000_create_cards.rb
Normal file
16
config/db/migrate/20260303180000_create_cards.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
Sequel.migration do
|
||||
change do
|
||||
create_table :cards do
|
||||
primary_key :id
|
||||
|
||||
column :name, String, null: false
|
||||
column :elixir_cost, Integer, null: false
|
||||
column :rarity, String
|
||||
column :type, String
|
||||
column :is_meta, Integer, default: 0
|
||||
|
||||
column :created_at, DateTime, null: false, default: Sequel::CURRENT_TIMESTAMP
|
||||
column :updated_at, DateTime, null: false, default: Sequel::CURRENT_TIMESTAMP
|
||||
end
|
||||
end
|
||||
end
|
||||
11
config/db/migrate/20260303200000_enable_sqlite_wal.rb
Normal file
11
config/db/migrate/20260303200000_enable_sqlite_wal.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
Sequel.migration do
|
||||
up do
|
||||
run "PRAGMA journal_mode = WAL;"
|
||||
run "PRAGMA synchronous = NORMAL;"
|
||||
end
|
||||
|
||||
down do
|
||||
run "PRAGMA journal_mode = DELETE;"
|
||||
run "PRAGMA synchronous = FULL;"
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user