diff --git a/db/migrate/20241017040725_add_period_to_auctions.rb b/db/migrate/20241017040725_add_period_to_auctions.rb new file mode 100644 index 00000000..4f05d3e4 --- /dev/null +++ b/db/migrate/20241017040725_add_period_to_auctions.rb @@ -0,0 +1,6 @@ +class AddPeriodToAuctions < ActiveRecord::Migration[7.1] + def change + add_column :auctions, :period, :string + add_index :auctions, :period, unique: true + end +end diff --git a/db/schema.rb b/db/schema.rb index 58d2eeac..cb2f7d87 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,10 +10,8 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2024_07_27_153312) do +ActiveRecord::Schema[7.1].define(version: 2024_10_17_040725) do # These are extensions that must be enabled in order to support this database - enable_extension "pageinspect" - enable_extension "pgcrypto" enable_extension "plpgsql" create_table "action_text_rich_texts", force: :cascade do |t| @@ -105,6 +103,8 @@ t.datetime "end_at", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.string "period" + t.index ["period"], name: "index_auctions_on_period", unique: true t.index ["slug"], name: "index_auctions_on_slug", unique: true t.index ["title"], name: "index_auctions_on_title", unique: true end