mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-17 06:52:27 +01:00
fix revert migrations
This commit is contained in:
parent
a0e7e7951f
commit
e86de06c45
@ -7,7 +7,7 @@ class MigrateSlotsReservations < ActiveRecord::Migration
|
||||
|
||||
def down
|
||||
SlotsReservation.all.each do |sr|
|
||||
Slot.find(sr.slot_id).update_attributes(:availability_id => sr.availability_id)
|
||||
Slot.find(sr.slot_id).update_attributes(:reservation_id => sr.reservation_id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
26
db/schema.rb
26
db/schema.rb
@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20170227114634) do
|
||||
ActiveRecord::Schema.define(version: 20170213142543) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
@ -546,19 +546,11 @@ ActiveRecord::Schema.define(version: 20170227114634) do
|
||||
t.datetime "ex_end_at"
|
||||
t.datetime "canceled_at"
|
||||
t.boolean "offered", default: false
|
||||
t.boolean "destroying", default: false
|
||||
t.integer "reservation_id"
|
||||
end
|
||||
|
||||
add_index "slots", ["availability_id"], name: "index_slots_on_availability_id", using: :btree
|
||||
|
||||
create_table "slots_reservations", force: :cascade do |t|
|
||||
t.integer "slot_id"
|
||||
t.integer "reservation_id"
|
||||
end
|
||||
|
||||
add_index "slots_reservations", ["reservation_id"], name: "index_slots_reservations_on_reservation_id", using: :btree
|
||||
add_index "slots_reservations", ["slot_id"], name: "index_slots_reservations_on_slot_id", using: :btree
|
||||
|
||||
create_table "spaces", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.integer "default_places"
|
||||
@ -569,16 +561,6 @@ ActiveRecord::Schema.define(version: 20170227114634) do
|
||||
t.text "characteristics"
|
||||
end
|
||||
|
||||
create_table "spaces_availabilities", force: :cascade do |t|
|
||||
t.integer "space_id"
|
||||
t.integer "availability_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
add_index "spaces_availabilities", ["availability_id"], name: "index_spaces_availabilities_on_availability_id", using: :btree
|
||||
add_index "spaces_availabilities", ["space_id"], name: "index_spaces_availabilities_on_space_id", using: :btree
|
||||
|
||||
create_table "statistic_custom_aggregations", force: :cascade do |t|
|
||||
t.text "query"
|
||||
t.integer "statistic_type_id"
|
||||
@ -857,10 +839,6 @@ ActiveRecord::Schema.define(version: 20170227114634) do
|
||||
add_foreign_key "prices", "plans"
|
||||
add_foreign_key "projects_spaces", "projects"
|
||||
add_foreign_key "projects_spaces", "spaces"
|
||||
add_foreign_key "slots_reservations", "reservations"
|
||||
add_foreign_key "slots_reservations", "slots"
|
||||
add_foreign_key "spaces_availabilities", "availabilities"
|
||||
add_foreign_key "spaces_availabilities", "spaces"
|
||||
add_foreign_key "statistic_custom_aggregations", "statistic_types"
|
||||
add_foreign_key "tickets", "event_price_categories"
|
||||
add_foreign_key "tickets", "reservations"
|
||||
|
Loading…
x
Reference in New Issue
Block a user