0
0
Fork 0

Add effective date to terms of service (#33993)

This commit is contained in:
Eugen Rochko 2025-03-05 10:01:33 +01:00 committed by GitHub
parent 84164270c6
commit cadda2f957
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
67 changed files with 201 additions and 126 deletions

View file

@ -0,0 +1,7 @@
# frozen_string_literal: true
class AddEffectiveDateToTermsOfServices < ActiveRecord::Migration[8.0]
def change
add_column :terms_of_services, :effective_date, :date
end
end

View file

@ -0,0 +1,9 @@
# frozen_string_literal: true
class AddEffectiveDateIndexToTermsOfServices < ActiveRecord::Migration[8.0]
disable_ddl_transaction!
def change
add_index :terms_of_services, :effective_date, unique: true, algorithm: :concurrently, where: 'effective_date IS NOT NULL'
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[8.0].define(version: 2025_01_29_144813) do
ActiveRecord::Schema[8.0].define(version: 2025_03_05_074104) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_catalog.plpgsql"
@ -1110,6 +1110,9 @@ ActiveRecord::Schema[8.0].define(version: 2025_01_29_144813) do
t.datetime "notification_sent_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.date "effective_date"
t.index ["effective_date"], name: "index_terms_of_services_on_effective_dat
e", unique: true, where: "(effective_date IS NOT NULL)"
end
create_table "tombstones", force: :cascade do |t|