mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
create deleted_at columns on topics/posts
This commit is contained in:
parent
a05deb4df8
commit
d55fb0896d
@ -0,0 +1,14 @@
|
||||
class AddDeletedAtDateTimesToThreddedTables < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_column :thredded_topics, :deleted_at, :datetime
|
||||
add_index :thredded_topics, :deleted_at
|
||||
add_index :thredded_topics, [:deleted_at, :messageboard_id]
|
||||
add_index :thredded_topics, [:deleted_at, :user_id]
|
||||
|
||||
add_column :thredded_posts, :deleted_at, :datetime
|
||||
add_index :thredded_posts, :deleted_at
|
||||
add_index :thredded_posts, [:deleted_at, :messageboard_id]
|
||||
add_index :thredded_posts, [:deleted_at, :postable_id]
|
||||
add_index :thredded_posts, [:deleted_at, :user_id]
|
||||
end
|
||||
end
|
||||
16
db/schema.rb
16
db/schema.rb
@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2020_10_19_080418) do
|
||||
ActiveRecord::Schema.define(version: 2021_03_08_072329) do
|
||||
|
||||
create_table "active_storage_attachments", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
@ -1187,6 +1187,7 @@ ActiveRecord::Schema.define(version: 2020_10_19_080418) do
|
||||
t.text "notes_text"
|
||||
t.index ["universe_id", "deleted_at"], name: "index_documents_on_universe_id_and_deleted_at"
|
||||
t.index ["universe_id"], name: "index_documents_on_universe_id"
|
||||
t.index ["user_id", "deleted_at"], name: "index_documents_on_user_id_and_deleted_at"
|
||||
t.index ["user_id"], name: "index_documents_on_user_id"
|
||||
end
|
||||
|
||||
@ -2367,7 +2368,7 @@ ActiveRecord::Schema.define(version: 2020_10_19_080418) do
|
||||
t.datetime "created_at", precision: 6, null: false
|
||||
t.datetime "updated_at", precision: 6, null: false
|
||||
t.string "description"
|
||||
t.boolean "allow_submissions", default: false
|
||||
t.boolean "allow_submissions"
|
||||
t.string "slug"
|
||||
t.datetime "deleted_at"
|
||||
t.index ["user_id"], name: "index_page_collections_on_user_id"
|
||||
@ -2832,7 +2833,7 @@ ActiveRecord::Schema.define(version: 2020_10_19_080418) do
|
||||
end
|
||||
|
||||
create_table "share_comments", force: :cascade do |t|
|
||||
t.integer "user_id"
|
||||
t.integer "user_id", null: false
|
||||
t.integer "content_page_share_id", null: false
|
||||
t.string "message"
|
||||
t.datetime "deleted_at"
|
||||
@ -3135,6 +3136,11 @@ ActiveRecord::Schema.define(version: 2020_10_19_080418) do
|
||||
t.integer "moderation_state", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.datetime "deleted_at"
|
||||
t.index ["deleted_at", "messageboard_id"], name: "index_thredded_posts_on_deleted_at_and_messageboard_id"
|
||||
t.index ["deleted_at", "postable_id"], name: "index_thredded_posts_on_deleted_at_and_postable_id"
|
||||
t.index ["deleted_at", "user_id"], name: "index_thredded_posts_on_deleted_at_and_user_id"
|
||||
t.index ["deleted_at"], name: "index_thredded_posts_on_deleted_at"
|
||||
t.index ["messageboard_id"], name: "index_thredded_posts_on_messageboard_id"
|
||||
t.index ["moderation_state", "updated_at"], name: "index_thredded_posts_for_display"
|
||||
t.index ["postable_id"], name: "index_thredded_posts_on_postable_id"
|
||||
@ -3196,6 +3202,10 @@ ActiveRecord::Schema.define(version: 2020_10_19_080418) do
|
||||
t.datetime "last_post_at"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.datetime "deleted_at"
|
||||
t.index ["deleted_at", "messageboard_id"], name: "index_thredded_topics_on_deleted_at_and_messageboard_id"
|
||||
t.index ["deleted_at", "user_id"], name: "index_thredded_topics_on_deleted_at_and_user_id"
|
||||
t.index ["deleted_at"], name: "index_thredded_topics_on_deleted_at"
|
||||
t.index ["hash_id"], name: "index_thredded_topics_on_hash_id"
|
||||
t.index ["last_post_at"], name: "index_thredded_topics_on_last_post_at"
|
||||
t.index ["messageboard_id"], name: "index_thredded_topics_on_messageboard_id"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user