Add (admin-only) tickets via 'visibile' attribute [migration]
(cherry picked from commit ce0db3d7a736e7bcde480721986dbfb4a82aa083)
This commit is contained in:
parent
1fcd5c68c5
commit
26f0377c76
15 changed files with 56 additions and 10 deletions
11
db/migrate/20180409170433_add_visible_to_tickets.rb
Normal file
11
db/migrate/20180409170433_add_visible_to_tickets.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
class AddVisibleToTickets < ActiveRecord::Migration[5.0]
|
||||
def up
|
||||
add_column :tickets, :visible, :boolean, default: true
|
||||
Ticket.reset_column_information
|
||||
Ticket.update_all(visible: true) # rubocop:disable Rails/SkipsModelValidations
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :tickets, :visible
|
||||
end
|
||||
end
|
||||
|
|
@ -435,7 +435,6 @@ ActiveRecord::Schema.define(version: 20181113195810) do
|
|||
t.datetime "updated_at"
|
||||
t.boolean "include_cfp", default: false
|
||||
t.boolean "include_booths"
|
||||
t.boolean "shuffle_highlights", default: false, null: false
|
||||
end
|
||||
|
||||
create_table "sponsors", force: :cascade do |t|
|
||||
|
|
@ -530,6 +529,7 @@ ActiveRecord::Schema.define(version: 20181113195810) do
|
|||
t.boolean "registration_ticket", default: false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.boolean "visible", default: true
|
||||
end
|
||||
|
||||
create_table "tracks", force: :cascade do |t|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue