fix: optimize and normalize bills and blacklist
This commit is contained in:
parent
152fe786b9
commit
901b078d7f
2 changed files with 21 additions and 0 deletions
11
migrations/1744294267663-blacklist-normalization.js
Normal file
11
migrations/1744294267663-blacklist-normalization.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
const db = require('./db')
|
||||
|
||||
exports.up = next => db.multi([
|
||||
'ALTER TABLE public.blacklist DROP CONSTRAINT IF EXISTS blacklist_pkey;',
|
||||
'ALTER TABLE public.blacklist ADD PRIMARY KEY (address);',
|
||||
'DROP INDEX IF EXISTS blacklist_temp_address_key;',
|
||||
'CREATE UNIQUE INDEX blacklist_address_idx ON public.blacklist USING btree (address);',
|
||||
|
||||
], next)
|
||||
|
||||
exports.down = next => next()
|
||||
Loading…
Add table
Add a link
Reference in a new issue