Skip to content

Commit 6e7f203

Browse files
committed
Fixed migration
1 parent e4c2d4c commit 6e7f203

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

db/migrate/20250314221852_alumni_visibility.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ class AlumniVisibility < ActiveRecord::Migration[7.0]
22
def up
33
add_column :photo_albums, :visibility, :string, default: 'members'
44

5-
photoAlbums.find_each do |record|
5+
PhotoAlbum.find_each do |record|
66
record.update!(visibility: record.publicly_visible ? 'public' : 'members')
77
end
88

@@ -12,7 +12,7 @@ def up
1212
def down
1313
add_column :photo_albums, :publicly_visible, :boolean, default: false, null: false
1414

15-
photoAlbums.find_each do |record|
15+
PhotoAlbum.find_each do |record|
1616
record.update!(publicly_visible: record.visibility == 'public')
1717
end
1818

db/schema.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema[7.0].define(version: 2025_02_18_204807) do
13+
ActiveRecord::Schema[7.0].define(version: 2025_03_14_221852) do
1414
# These are extensions that must be enabled in order to support this database
1515
enable_extension "plpgsql"
1616

@@ -39,7 +39,7 @@
3939
t.string "content_type"
4040
t.text "metadata"
4141
t.bigint "byte_size", null: false
42-
t.string "checksum", null: false
42+
t.string "checksum"
4343
t.datetime "created_at", precision: nil, null: false
4444
t.string "service_name", null: false
4545
t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
@@ -229,7 +229,7 @@
229229
t.datetime "updated_at", precision: nil, null: false
230230
t.boolean "completed", default: false, null: false
231231
t.integer "lock_version"
232-
t.index ["form_id", "user_id"], name: "index_form_responses_on_form_id_and_user_id", unique: true
232+
t.index ["form_id", "user_id"], name: "index_form_responses_on_form_id_and_user_id_partial", unique: true, where: "(user_id <> 0)"
233233
t.index ["user_id"], name: "index_form_responses_on_user_id"
234234
end
235235

@@ -411,9 +411,9 @@
411411
t.datetime "created_at", precision: nil, null: false
412412
t.datetime "updated_at", precision: nil, null: false
413413
t.datetime "deleted_at", precision: nil
414-
t.boolean "publicly_visible", default: false, null: false
415414
t.bigint "author_id"
416415
t.bigint "group_id"
416+
t.string "visibility", default: "members"
417417
t.index ["author_id"], name: "index_photo_albums_on_author_id"
418418
t.index ["deleted_at"], name: "index_photo_albums_on_deleted_at"
419419
t.index ["group_id"], name: "index_photo_albums_on_group_id"
@@ -558,8 +558,7 @@
558558
t.string "almanak_subscription_preference", default: "physical"
559559
t.string "digtus_subscription_preference", default: "physical"
560560
t.string "user_details_sharing_preference"
561-
t.boolean "allow_tomato_sharing", default: false, null: false
562-
t.string "webdav_secret_key"
561+
t.boolean "allow_sofia_sharing", default: false, null: false
563562
t.string "nickname"
564563
t.boolean "trailer_drivers_license", default: false, null: false
565564
t.boolean "setup_complete", default: false, null: false

0 commit comments

Comments
 (0)