hubfeenix.fi/db/migrate/20230116120518_create_events.rb

15 lines
361 B
Ruby

class CreateEvents < ActiveRecord::Migration[7.0]
def change
create_table :events do |t|
t.string :name , null: false
t.text :text , null: false
t.date :start_date , null: false
t.date :end_date
t.references :profile, null: false, foreign_key: true
t.string :picture , null: false
t.timestamps
end
end
end