Skip to content

Commit

Permalink
chore: remove unused db stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
BlankParticle committed Aug 31, 2024
1 parent e9c41d6 commit d37ad87
Show file tree
Hide file tree
Showing 6 changed files with 4,661 additions and 54 deletions.
9 changes: 0 additions & 9 deletions apps/platform/utils/auth/passkeyUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ export async function createAuthenticator(
await passkeyDb.insert(authenticators).values({
publicId: passkeyPublicId,
accountId: authenticator.accountId,
// TODO: remove once table has been migrated
// Just keeping for data parity
accountCredentialId: authenticator.accountId,
nickname: nickname,
credentialID: b64ID,
credentialPublicKey: b64PK,
Expand Down Expand Up @@ -93,8 +90,6 @@ export async function getAuthenticator(credentialId: string) {
id: true,
publicId: true,
accountId: true,
// TODO: remove once table has been migrated
accountCredentialId: true,
nickname: true,
credentialID: true,
credentialPublicKey: true,
Expand Down Expand Up @@ -128,8 +123,6 @@ export async function listAuthenticatorsByAccountCredentialId(
id: true,
publicId: true,
accountId: true,
// TODO: remove once table has been migrated
accountCredentialId: true,
nickname: true,
credentialID: true,
credentialPublicKey: true,
Expand All @@ -155,8 +148,6 @@ export async function listAuthenticatorsByAccountId(accountId: number) {
id: true,
publicId: true,
nickname: true,
// TODO: remove once table has been migrated
accountCredentialId: true,
accountId: true,
credentialID: true,
credentialPublicKey: true,
Expand Down
2 changes: 0 additions & 2 deletions ee/apps/command/src/server/trpc/routers/accountRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export const accountRouter = router({
username: true,
createdAt: true,
metadata: true,
preAccount: true,
recoveryCode: true,
lastLoginAt: true
}
Expand Down Expand Up @@ -116,7 +115,6 @@ export const accountRouter = router({
username: true,
createdAt: true,
metadata: true,
preAccount: true,
recoveryCode: true,
lastLoginAt: true
},
Expand Down
4 changes: 4 additions & 0 deletions packages/database/migrations/0001_flimsy_mercury.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DROP TABLE `account_credentials`;--> statement-breakpoint
DROP INDEX `provider_account_id_idx` ON `authenticators`;--> statement-breakpoint
ALTER TABLE `accounts` DROP COLUMN `pre_account`;--> statement-breakpoint
ALTER TABLE `authenticators` DROP COLUMN `account_credential_id`;
Loading

0 comments on commit d37ad87

Please sign in to comment.