Files
sanasto-wiki/db/migrate/20260122123818_create_entries.rb

22 lines
556 B
Ruby

class CreateEntries < ActiveRecord::Migration[8.1]
def change
create_table :entries do |t|
t.integer :category, null: false, default: 0
t.string :fi
t.string :en
t.string :sv
t.string :no
t.string :ru
t.string :de
t.text :notes
t.boolean :verified, null: false, default: false
t.references :created_by, null: true, foreign_key: { to_table: :users }
t.references :updated_by, null: true, foreign_key: { to_table: :users }
t.index :category
t.timestamps
end
end
end