mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
14 lines
349 B
Ruby
14 lines
349 B
Ruby
# frozen_string_literal: true
|
|
|
|
class CreateFamilies < ActiveRecord::Migration[8.0]
|
|
def change
|
|
create_table :families do |t|
|
|
t.string :name, null: false, limit: 50
|
|
t.bigint :creator_id, null: false
|
|
t.timestamps
|
|
end
|
|
|
|
add_foreign_key :families, :users, column: :creator_id
|
|
add_index :families, :creator_id
|
|
end
|
|
end
|