Events: initial implementation
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
class CreateEvents < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
create_table :events do |t|
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddNameToEvent < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
add_column :events, :name, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddEventToContest < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
add_reference :contests, :event, foreign_key: true
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddUserToEvent < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
add_reference :events, :user, null: false, foreign_key: true
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddSharedScoreboardToEvent < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
add_column :events, :shared_scoreboard, :boolean
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddLangToEvent < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
add_column :events, :lang, :string, default: 'en'
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user