Events: initial implementation
This commit is contained in:
7
db/migrate/20260725121740_create_events.rb
Normal file
7
db/migrate/20260725121740_create_events.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
class CreateEvents < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
create_table :events do |t|
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
5
db/migrate/20260725122117_add_name_to_event.rb
Normal file
5
db/migrate/20260725122117_add_name_to_event.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddNameToEvent < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
add_column :events, :name, :string
|
||||
end
|
||||
end
|
||||
5
db/migrate/20260725122358_add_event_to_contest.rb
Normal file
5
db/migrate/20260725122358_add_event_to_contest.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddEventToContest < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
add_reference :contests, :event, foreign_key: true
|
||||
end
|
||||
end
|
||||
5
db/migrate/20260725122559_add_user_to_event.rb
Normal file
5
db/migrate/20260725122559_add_user_to_event.rb
Normal file
@@ -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
|
||||
5
db/migrate/20260726114604_add_lang_to_event.rb
Normal file
5
db/migrate/20260726114604_add_lang_to_event.rb
Normal file
@@ -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