dawarich/db/migrate/20240323160300_create_stats.rb

16 lines
354 B
Ruby
Raw Normal View History

2024-03-23 15:29:55 -04:00
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