mirror of
https://github.com/we-promise/sure.git
synced 2026-04-20 20:44:08 +00:00
Stronger security unique index and data migration
Note to self hosters: If you started self hosting prior to this commit, you may have duplicate securities in your database. This is usually not a problem, but if you'd like to clean things up, you can run the data migration by opening a terminal on the machine you're hosting with and running: ```sh rake data_migration:migrate_duplicate_securities ```
This commit is contained in:
4
db/schema.rb
generated
4
db/schema.rb
generated
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.2].define(version: 2025_05_21_112347) do
|
||||
ActiveRecord::Schema[7.2].define(version: 2025_05_22_174753) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pgcrypto"
|
||||
enable_extension "plpgsql"
|
||||
@@ -517,9 +517,9 @@ ActiveRecord::Schema[7.2].define(version: 2025_05_21_112347) do
|
||||
t.datetime "failed_fetch_at"
|
||||
t.integer "failed_fetch_count", default: 0, null: false
|
||||
t.datetime "last_health_check_at"
|
||||
t.index "upper((ticker)::text), COALESCE(upper((exchange_operating_mic)::text), ''::text)", name: "index_securities_on_ticker_and_exchange_operating_mic_unique", unique: true
|
||||
t.index ["country_code"], name: "index_securities_on_country_code"
|
||||
t.index ["exchange_operating_mic"], name: "index_securities_on_exchange_operating_mic"
|
||||
t.index ["ticker", "exchange_operating_mic"], name: "index_securities_on_ticker_and_exchange_operating_mic", unique: true
|
||||
end
|
||||
|
||||
create_table "security_prices", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||
|
||||
Reference in New Issue
Block a user