time
Some checks are pending
Backend CI / test (push) Waiting to run
Backend CI / build (push) Blocked by required conditions
Deploy Mnemo Cards / Deploy Backend (push) Waiting to run
Deploy Mnemo Cards / Deploy Web App (push) Blocked by required conditions
Deploy Mnemo Cards / Final Verification (push) Blocked by required conditions
Some checks are pending
Backend CI / test (push) Waiting to run
Backend CI / build (push) Blocked by required conditions
Deploy Mnemo Cards / Deploy Backend (push) Waiting to run
Deploy Mnemo Cards / Deploy Web App (push) Blocked by required conditions
Deploy Mnemo Cards / Final Verification (push) Blocked by required conditions
This commit is contained in:
parent
8e564006dd
commit
8a69da6412
1 changed files with 4 additions and 2 deletions
|
|
@ -200,7 +200,8 @@ class AppDatabase extends _$AppDatabase {
|
|||
|
||||
// Auth indexes
|
||||
await customStatement('CREATE INDEX IF NOT EXISTS idx_tokens_user_id ON tokens(user_id)');
|
||||
await customStatement('CREATE INDEX IF NOT EXISTS idx_tokens_expires ON tokens(expires) WHERE expires > EXTRACT(EPOCH FROM NOW())::BIGINT');
|
||||
// Индекс на expires без предиката (NOW() не может быть использована в предикате индекса)
|
||||
await customStatement('CREATE INDEX IF NOT EXISTS idx_tokens_expires ON tokens(expires)');
|
||||
await customStatement('CREATE INDEX IF NOT EXISTS idx_refresh_tokens_user_id ON refresh_tokens(user_id)');
|
||||
await customStatement('CREATE INDEX IF NOT EXISTS idx_refresh_tokens_jti ON refresh_tokens(jti)');
|
||||
await customStatement('CREATE INDEX IF NOT EXISTS idx_refresh_tokens_not_blacklisted ON refresh_tokens(is_blacklisted) WHERE is_blacklisted = false');
|
||||
|
|
@ -225,7 +226,8 @@ class AppDatabase extends _$AppDatabase {
|
|||
|
||||
// Subscriptions indexes
|
||||
await customStatement('CREATE INDEX IF NOT EXISTS idx_subscriptions_user_id ON user_subscriptions(user_id)');
|
||||
await customStatement('CREATE INDEX IF NOT EXISTS idx_subscriptions_active ON user_subscriptions(finish) WHERE finish > EXTRACT(EPOCH FROM NOW())::BIGINT');
|
||||
// Индекс на finish без предиката (NOW() не может быть использована в предикате индекса)
|
||||
await customStatement('CREATE INDEX IF NOT EXISTS idx_subscriptions_finish ON user_subscriptions(finish)');
|
||||
|
||||
// Tests indexes
|
||||
await customStatement('CREATE INDEX IF NOT EXISTS idx_test_questions_test_id ON test_questions(test_id)');
|
||||
|
|
|
|||
Loading…
Reference in a new issue