mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 14:31:25 +00:00
Family subscription unique index
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
class AddUniquenessToSubscriptions < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
remove_index :subscriptions, :family_id
|
||||
add_index :subscriptions, :family_id, unique: true
|
||||
end
|
||||
end
|
||||
4
db/schema.rb
generated
4
db/schema.rb
generated
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.2].define(version: 2025_05_09_182903) do
|
||||
ActiveRecord::Schema[7.2].define(version: 2025_05_13_122703) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pgcrypto"
|
||||
enable_extension "plpgsql"
|
||||
@@ -580,7 +580,7 @@ ActiveRecord::Schema[7.2].define(version: 2025_05_09_182903) do
|
||||
t.datetime "trial_ends_at"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["family_id"], name: "index_subscriptions_on_family_id"
|
||||
t.index ["family_id"], name: "index_subscriptions_on_family_id", unique: true
|
||||
end
|
||||
|
||||
create_table "syncs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||
|
||||
Reference in New Issue
Block a user