forked from Tietokilta/ilmomasiina
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Tietokilta/dev
TiK updates
- Loading branch information
Showing
15 changed files
with
138 additions
and
213 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
packages/ilmomasiina-backend/src/models/migrations/0005-add-indexes.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { defineMigration } from './util'; | ||
|
||
export default defineMigration({ | ||
name: '0005-add-indexes', | ||
async up({ context: { sequelize } }) { | ||
const query = sequelize.getQueryInterface(); | ||
await query.addIndex( | ||
'quota', | ||
{ | ||
name: 'idx_quota_main', | ||
fields: ['eventId', 'deletedAt'], | ||
}, | ||
); | ||
await query.addIndex( | ||
'signup', | ||
{ | ||
name: 'idx_signup_main', | ||
fields: ['quotaId', 'deletedAt', 'confirmedAt', 'createdAt'], | ||
}, | ||
); | ||
await query.addIndex( | ||
'answer', | ||
{ | ||
name: 'idx_answer_main', | ||
fields: ['signupId', 'questionId', 'deletedAt'], | ||
}, | ||
); | ||
}, | ||
async down({ context: { sequelize } }) { | ||
const query = sequelize.getQueryInterface(); | ||
await query.removeIndex('quota', 'idx_quota_main'); | ||
await query.removeIndex('signup', 'idx_signup_main'); | ||
await query.removeIndex('answer', 'idx_answer_main'); | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
import { createContext } from 'react'; | ||
|
||
export interface AuthState { | ||
accessToken?: string; | ||
loggedIn: boolean; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.