diff --git a/db/migrate/20181229233812_drop_organizations.rb b/db/migrate/20181229233812_drop_organizations.rb new file mode 100644 index 00000000..dd1be5f2 --- /dev/null +++ b/db/migrate/20181229233812_drop_organizations.rb @@ -0,0 +1,11 @@ +class DropOrganizations < ActiveRecord::Migration[7.0] + def change + drop_table :organizations do |t| + t.string :name, null: false + t.text :description + t.string :picture + end + + remove_reference :conferences, :organization, index: true + end +end diff --git a/db/migrate/20181229233813_add_code_of_conduct_to_conference.rb b/db/migrate/20181229233813_add_code_of_conduct_to_conference.rb new file mode 100644 index 00000000..6151241f --- /dev/null +++ b/db/migrate/20181229233813_add_code_of_conduct_to_conference.rb @@ -0,0 +1,5 @@ +class AddCodeOfConductToConference < ActiveRecord::Migration[7.0] + def change + add_column :conferences, :code_of_conduct, :text + end +end diff --git a/db/schema.rb b/db/schema.rb index 2ad25c7e..ab00f623 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2,15 +2,17 @@ # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # -# Note that this schema.rb definition is the authoritative source for your -# database schema. If you need to create the application database on another -# system, you should be using db:schema:load, not running all the migrations -# from scratch. The latter is a flawed and unsustainable approach (the more migrations -# you'll amass, the slower it'll run and the greater likelihood for issues). +# This file is the source Rails uses to define your schema when running `bin/rails +# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to +# be faster and is potentially less error prone than running all of your +# migrations from scratch. Old migrations may fail to apply correctly if those +# migrations use external dependencies or application code. # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20181229233811) do +ActiveRecord::Schema[7.0].define(version: 2018_12_29_233813) do + # These are extensions that must be enabled in order to support this database + enable_extension "plpgsql" create_table "answers", force: :cascade do |t| t.string "title" @@ -100,11 +102,10 @@ ActiveRecord::Schema.define(version: 20181229233811) do t.string "picture" t.integer "start_hour", default: 9 t.integer "end_hour", default: 20 - t.integer "organization_id" t.integer "ticket_layout", default: 0 t.string "custom_domain" t.integer "booth_limit", default: 0 - t.index ["organization_id"], name: "index_conferences_on_organization_id" + t.text "code_of_conduct" end create_table "conferences_questions", id: false, force: :cascade do |t| @@ -285,13 +286,6 @@ ActiveRecord::Schema.define(version: 20181229233811) do t.datetime "updated_at" end - create_table "organizations", force: :cascade do |t| - t.string "name", null: false - t.text "description" - t.string "picture" - t.text "code_of_conduct" - end - create_table "payments", force: :cascade do |t| t.string "last4" t.integer "amount"