1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Added logic to delegate tournament access

This commit is contained in:
2016-01-06 18:38:02 +00:00
parent eb9037b078
commit f46029efaf
46 changed files with 417 additions and 121 deletions

View File

@@ -0,0 +1,10 @@
class CreateTournamentDelegates < ActiveRecord::Migration
def change
create_table :tournament_delegates do |t|
t.integer :user_id
t.integer :tournament_id
t.timestamps null: false
end
end
end

View File

@@ -0,0 +1,10 @@
class CreateSchoolDelegates < ActiveRecord::Migration
def change
create_table :school_delegates do |t|
t.integer :user_id
t.integer :school_id
t.timestamps null: false
end
end
end

View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20151230164000) do
ActiveRecord::Schema.define(version: 20160106031418) do
create_table "delayed_jobs", force: :cascade do |t|
t.integer "priority", default: 0, null: false
@@ -64,6 +64,13 @@ ActiveRecord::Schema.define(version: 20151230164000) do
add_index "mats", ["tournament_id"], name: "index_mats_on_tournament_id"
create_table "school_delegates", force: :cascade do |t|
t.integer "user_id"
t.integer "school_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "schools", force: :cascade do |t|
t.string "name"
t.datetime "created_at"
@@ -83,6 +90,13 @@ ActiveRecord::Schema.define(version: 20151230164000) do
add_index "teampointadjusts", ["wrestler_id"], name: "index_teampointadjusts_on_wrestler_id"
create_table "tournament_delegates", force: :cascade do |t|
t.integer "user_id"
t.integer "tournament_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "tournaments", force: :cascade do |t|
t.string "name"
t.string "address"