mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
Add todo example, remove yarn, change schema structure, update readme
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { defineConfig } from "drizzle-kit";
|
||||
|
||||
export default defineConfig({
|
||||
schema: "./src/db/schema.ts",
|
||||
out: "./migrations",
|
||||
schema: "./src/db/schema",
|
||||
out: "./src/db/migrations",
|
||||
dialect: "postgresql",
|
||||
dbCredentials: {
|
||||
url: process.env.POSTGRES_URL || "",
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
import { pgTable, text, integer, timestamp, boolean } from "drizzle-orm/pg-core";
|
||||
|
||||
export const todo = pgTable("todo", {
|
||||
id: serial("id").primaryKey(),
|
||||
text: text("text").notNull(),
|
||||
completed: boolean("completed").default(false).notNull()
|
||||
});
|
||||
import { pgTable, text, timestamp, boolean, serial } from "drizzle-orm/pg-core";
|
||||
|
||||
export const user = pgTable("user", {
|
||||
id: text("id").primaryKey(),
|
||||
@@ -1,4 +1,4 @@
|
||||
import { pgTable, text, integer, timestamp, boolean } from "drizzle-orm/pg-core";
|
||||
import { pgTable, text, boolean, serial } from "drizzle-orm/pg-core";
|
||||
|
||||
export const todo = pgTable("todo", {
|
||||
id: serial("id").primaryKey(),
|
||||
@@ -1,7 +1,7 @@
|
||||
import { betterAuth } from "better-auth";
|
||||
import { drizzleAdapter } from "better-auth/adapters/drizzle";
|
||||
import { db } from "../db";
|
||||
import * as schema from "../db/schema";
|
||||
import * as schema from "../db/schema/auth";
|
||||
|
||||
export const auth = betterAuth({
|
||||
database: drizzleAdapter(db, {
|
||||
|
||||
Reference in New Issue
Block a user