Events: initial implementation
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled

This commit is contained in:
sto
2026-07-26 14:01:29 +02:00
parent fa8880abfc
commit 35b304d913
26 changed files with 389 additions and 24 deletions

View File

@@ -0,0 +1,7 @@
class CreateEvents < ActiveRecord::Migration[8.0]
def change
create_table :events do |t|
t.timestamps
end
end
end

View File

@@ -0,0 +1,5 @@
class AddNameToEvent < ActiveRecord::Migration[8.0]
def change
add_column :events, :name, :string
end
end

View File

@@ -0,0 +1,5 @@
class AddEventToContest < ActiveRecord::Migration[8.0]
def change
add_reference :contests, :event, foreign_key: true
end
end

View File

@@ -0,0 +1,5 @@
class AddUserToEvent < ActiveRecord::Migration[8.0]
def change
add_reference :events, :user, null: false, foreign_key: true
end
end

View File

@@ -0,0 +1,5 @@
class AddSharedScoreboardToEvent < ActiveRecord::Migration[8.0]
def change
add_column :events, :shared_scoreboard, :boolean
end
end

View File

@@ -0,0 +1,5 @@
class AddLangToEvent < ActiveRecord::Migration[8.0]
def change
add_column :events, :lang, :string, default: 'en'
end
end