Skip to content

Commit

Permalink
Fixed studyroomMigration (#462)
Browse files Browse the repository at this point in the history
* fixed studyroomMigration

* added qp again

* 1/2 edited migration

* 2/2 fixed schema.rb

* improved migration
lodewiges authored Nov 21, 2024
1 parent 7eafcf6 commit 4003999
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions db/migrate/20241027103012_create_study_room_presence.rb
Original file line number Diff line number Diff line change
@@ -8,10 +8,10 @@ def change
t.datetime :deleted_at
t.timestamps
end
end

Permission.create(name: 'study_room_presence.create')
Permission.create(name: 'study_room_presence.read')
Permission.create(name: 'study_room_presence.update')
Permission.create(name: 'study_room_presence.destroy')
Permission.find_or_create_by!(name: 'study_room_presence.create')
Permission.find_or_create_by!(name: 'study_room_presence.read')
Permission.find_or_create_by!(name: 'study_room_presence.update')
Permission.find_or_create_by!(name: 'study_room_presence.destroy')
end
end
3 changes: 2 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.0].define(version: 2024_10_27_103012) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -484,7 +485,7 @@
t.index ["datetime"], name: "index_quickpost_messages_on_datetime"
t.index ["deleted_at"], name: "index_quickpost_messages_on_deleted_at"
end

create_table "room_adverts", force: :cascade do |t|
t.string "house_name", null: false
t.string "contact", null: false

0 comments on commit 4003999

Please sign in to comment.