This repository has been archived by the owner on Sep 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: migrate database query api (#140)
- Loading branch information
1 parent
22132b7
commit d03bd83
Showing
111 changed files
with
3,122 additions
and
2,449 deletions.
There are no files selected for viewing
48 changes: 0 additions & 48 deletions
48
modules/auth/db/migrations/20240310214734_init/migration.sql
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
modules/auth/db/migrations/20240312024843_init/migration.sql
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
modules/auth_email/db/migrations/20240807214202_/migration.sql
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
import { schema, Query } from "./schema.gen.ts"; | ||
|
||
export const verifications = schema.table('verifications', { | ||
id: Query.uuid("id").primaryKey().defaultRandom(), | ||
|
||
email: Query.text("email").notNull(), | ||
|
||
code: Query.text("code").notNull().unique(), | ||
token: Query.text("token").notNull().unique(), | ||
|
||
attemptCount: Query.integer("attempt_count").notNull().default(0), | ||
maxAttemptCount: Query.integer("max_attempt_count").notNull(), | ||
|
||
createdAt: Query.timestamp("created_at").notNull().defaultNow(), | ||
expireAt: Query.timestamp("expire_at").notNull(), | ||
completedAt: Query.timestamp("completed_at"), | ||
}); | ||
|
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,11 +1,11 @@ | ||
import { RuntimeError, test, TestContext } from "../module.gen.ts"; | ||
import { faker } from "https://deno.land/x/[email protected]/mod.ts"; | ||
import { getVerification } from "../utils/tests.ts"; | ||
import { getVerification } from "./common.ts"; | ||
import { | ||
assertEquals, | ||
assertRejects, | ||
} from "https://deno.land/[email protected]/assert/mod.ts"; | ||
import { checkLogin } from "../utils/tests.ts"; | ||
import { checkLogin } from "./common.ts"; | ||
|
||
async function signUpEmailPass( | ||
ctx: TestContext, | ||
|
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
7 changes: 0 additions & 7 deletions
7
modules/currency/db/migrations/20240307005922_init/migration.sql
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,7 @@ | ||
import { schema, Query } from "./schema.gen.ts"; | ||
|
||
export const userWallets = schema.table("user_wallets", { | ||
userId: Query.uuid("user_id").primaryKey().defaultRandom(), | ||
balance: Query.integer("balance").notNull(), | ||
}); | ||
|
Oops, something went wrong.