parent
a6b5e64e15
commit
e5ab4a3eb2
9 changed files with 104 additions and 21 deletions
11
db/migrate/20240217022038_add_count_to_ngword_histories.rb
Normal file
11
db/migrate/20240217022038_add_count_to_ngword_histories.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddCountToNgwordHistories < ActiveRecord::Migration[7.1]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
add_column :ngword_histories, :count, :integer, null: false, default: 0
|
||||
|
||||
add_index :ngword_histories, [:uri, :reason, :created_at], unique: false, algorithm: :concurrently
|
||||
end
|
||||
end
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.1].define(version: 2024_02_16_042730) do
|
||||
ActiveRecord::Schema[7.1].define(version: 2024_02_17_022038) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
||||
|
@ -876,7 +876,9 @@ ActiveRecord::Schema[7.1].define(version: 2024_02_16_042730) do
|
|||
t.string "keyword", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.integer "count", default: 0, null: false
|
||||
t.index ["uri", "keyword", "created_at"], name: "index_ngword_histories_on_uri_and_keyword_and_created_at"
|
||||
t.index ["uri", "reason", "created_at"], name: "index_ngword_histories_on_uri_and_reason_and_created_at"
|
||||
end
|
||||
|
||||
create_table "notifications", force: :cascade do |t|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue