mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -05:00
15 lines
377 B
Ruby
15 lines
377 B
Ruby
|
|
# frozen_string_literal: true
|
||
|
|
|
||
|
|
class CreateFamilies < ActiveRecord::Migration[8.0]
|
||
|
|
def change
|
||
|
|
create_table :families, id: :uuid 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, validate: false
|
||
|
|
add_index :families, :creator_id
|
||
|
|
end
|
||
|
|
end
|