Add track type to admin dashboard

This commit is contained in:
Rishabh Singh 2019-06-22 19:23:40 +05:30
parent 770a63e15c
commit abc59bb3d7
18 changed files with 252 additions and 2 deletions

View file

@ -0,0 +1,11 @@
class CreateTrackTypes < ActiveRecord::Migration[5.1]
def change
create_table :track_types do |t|
t.references :program
t.string :title, null: false
t.string :description
t.timestamps
end
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2019_06_03_143107) do
ActiveRecord::Schema.define(version: 20190622061319) do
create_table "answers", force: :cascade do |t|
t.string "title"
@ -532,6 +532,15 @@ ActiveRecord::Schema.define(version: 2019_06_03_143107) do
t.datetime "updated_at"
end
create_table "track_types", force: :cascade do |t|
t.integer "program_id"
t.string "title", null: false
t.string "description"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["program_id"], name: "index_track_types_on_program_id"
end
create_table "tracks", force: :cascade do |t|
t.string "guid", null: false
t.string "name", null: false