dawarich/db/migrate/20240323160300_create_stats.rb
2024-03-23 20:29:55 +01:00

15 lines
354 B
Ruby

class CreateStats < ActiveRecord::Migration[7.1]
def change
create_table :stats do |t|
t.integer :year, null: false
t.integer :month, null: false
t.integer :distance, null: false
t.jsonb :toponyms
t.timestamps
end
add_index :stats, :year
add_index :stats, :month
add_index :stats, :distance
end
end