-
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.
chore: use planetscale for db instead of neon (#31)
* migrate from neon to planetscale * remove migration step on ci * db:studio command
- Loading branch information
Din
authored
Feb 19, 2024
1 parent
0fb6376
commit 3e0fb22
Showing
15 changed files
with
123 additions
and
217 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
DATABASE_URL= |
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 |
---|---|---|
@@ -1,6 +1,20 @@ | ||
import { pgTable, timestamp, serial } from 'drizzle-orm/pg-core' | ||
import { sql } from 'drizzle-orm' | ||
import { mysqlTableCreator, timestamp, serial, varchar } from 'drizzle-orm/mysql-core' | ||
|
||
export const Tests = pgTable('tests', { | ||
/** | ||
* @see https://orm.drizzle.team/docs/goodies#multi-project-schema | ||
* @see https://orm.drizzle.team/kit-docs/conf#multi-project-schema | ||
*/ | ||
const mysqlTable = mysqlTableCreator((name) => `dinstack_${name}`) | ||
|
||
export const Users = mysqlTable('users', { | ||
id: serial('id'), | ||
createdAt: timestamp('created_at').defaultNow().notNull(), | ||
name: varchar('name', { length: 255 }), | ||
updatedAt: timestamp('updated_at') | ||
.notNull() | ||
.default(sql`CURRENT_TIMESTAMP`) | ||
.onUpdateNow(), | ||
createdAt: timestamp('created_at') | ||
.notNull() | ||
.default(sql`CURRENT_TIMESTAMP`), | ||
}) |
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 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
Empty file.
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.