finally building
This commit is contained in:
1
packages/db/drizzle.ts
Normal file
1
packages/db/drizzle.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from 'drizzle-orm';
|
||||
@@ -2,4 +2,4 @@ import { drizzle } from 'drizzle-orm/neon-http';
|
||||
|
||||
export const db = drizzle(process.env.DATABASE_URL!);
|
||||
|
||||
export * from './schema';
|
||||
export * from './schema.ts';
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"exports": {
|
||||
".": "./index.ts",
|
||||
"./schema": "./schema.ts",
|
||||
"./drizzle": "./drizzle.ts"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"lint": "eslint . --max-warnings 0",
|
||||
@@ -17,13 +22,14 @@
|
||||
"packageManager": "pnpm@10.4.1",
|
||||
"dependencies": {
|
||||
"@neondatabase/serverless": "^1.0.1",
|
||||
"drizzle-orm": "^0.44.2"
|
||||
"drizzle-orm": "^0.44.2",
|
||||
"drizzle-zod": "^0.8.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@workspace/eslint-config": "workspace:*",
|
||||
"@workspace/typescript-config": "workspace:*",
|
||||
"dotenv": "^16.5.0",
|
||||
"drizzle-kit": "^0.31.1",
|
||||
"typescript": "^5.7.3",
|
||||
"@workspace/eslint-config": "workspace:*",
|
||||
"@workspace/typescript-config": "workspace:*"
|
||||
"typescript": "^5.7.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,8 @@ import {
|
||||
check,
|
||||
} from 'drizzle-orm/pg-core';
|
||||
|
||||
export { createSelectSchema } from 'drizzle-zod';
|
||||
|
||||
export const students = pgTable('students', {
|
||||
id: serial().primaryKey(),
|
||||
email: text().notNull(),
|
||||
@@ -262,7 +264,6 @@ export const applicationsRelations = relations(applications, ({ one }) => ({
|
||||
references: [resumes.id],
|
||||
}),
|
||||
}));
|
||||
|
||||
export const admins = pgTable('admins', {
|
||||
id: serial().primaryKey(),
|
||||
email: text().notNull().unique(),
|
||||
@@ -272,3 +273,4 @@ export const admins = pgTable('admins', {
|
||||
.$onUpdate(() => new Date())
|
||||
.notNull(),
|
||||
});
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"extends": "@workspace/typescript-config/nextjs.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["./*"]
|
||||
},
|
||||
"allowImportingTsExtensions": true
|
||||
},
|
||||
"include": ["**/*.ts", "**/*.tsx"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user