mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-25 08:14:17 +08:00
Drop user notifications table [SCI-9384]
This commit is contained in:
parent
2434cca42c
commit
96e063b91e
2 changed files with 1 additions and 13 deletions
|
@ -40,6 +40,7 @@ class MigrateNotificationToNoticed < ActiveRecord::Migration[7.0]
|
||||||
UserNotification.delete_all
|
UserNotification.delete_all
|
||||||
Notification.where(type: nil).delete_all
|
Notification.where(type: nil).delete_all
|
||||||
|
|
||||||
|
drop_table :user_notifications
|
||||||
change_column_null :notifications, :type, false
|
change_column_null :notifications, :type, false
|
||||||
|
|
||||||
remove_column :notifications, :type_of
|
remove_column :notifications, :type_of
|
||||||
|
|
13
db/schema.rb
13
db/schema.rb
|
@ -1152,17 +1152,6 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_11_103114) do
|
||||||
t.index ["user_id"], name: "index_user_my_modules_on_user_id"
|
t.index ["user_id"], name: "index_user_my_modules_on_user_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "user_notifications", force: :cascade do |t|
|
|
||||||
t.bigint "user_id"
|
|
||||||
t.bigint "notification_id"
|
|
||||||
t.boolean "checked", default: false
|
|
||||||
t.datetime "created_at", precision: nil, null: false
|
|
||||||
t.datetime "updated_at", precision: nil, null: false
|
|
||||||
t.index ["checked"], name: "index_user_notifications_on_checked"
|
|
||||||
t.index ["notification_id"], name: "index_user_notifications_on_notification_id"
|
|
||||||
t.index ["user_id"], name: "index_user_notifications_on_user_id"
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "user_projects", force: :cascade do |t|
|
create_table "user_projects", force: :cascade do |t|
|
||||||
t.integer "role"
|
t.integer "role"
|
||||||
t.bigint "user_id", null: false
|
t.bigint "user_id", null: false
|
||||||
|
@ -1472,8 +1461,6 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_11_103114) do
|
||||||
add_foreign_key "user_my_modules", "my_modules"
|
add_foreign_key "user_my_modules", "my_modules"
|
||||||
add_foreign_key "user_my_modules", "users"
|
add_foreign_key "user_my_modules", "users"
|
||||||
add_foreign_key "user_my_modules", "users", column: "assigned_by_id"
|
add_foreign_key "user_my_modules", "users", column: "assigned_by_id"
|
||||||
add_foreign_key "user_notifications", "notifications"
|
|
||||||
add_foreign_key "user_notifications", "users"
|
|
||||||
add_foreign_key "user_projects", "projects"
|
add_foreign_key "user_projects", "projects"
|
||||||
add_foreign_key "user_projects", "users"
|
add_foreign_key "user_projects", "users"
|
||||||
add_foreign_key "user_projects", "users", column: "assigned_by_id"
|
add_foreign_key "user_projects", "users", column: "assigned_by_id"
|
||||||
|
|
Loading…
Reference in a new issue