Initial commit

This commit is contained in:
Meier Lukas committed 2023-12-08 22:35:15 +01:00
commit a2cedf73c0
74 files changed
+15357

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import { sql } from "drizzle-orm";
import { serial, timestamp, varchar } from "drizzle-orm/mysql-core";
import { mySqlTable } from "./_table";
export const post = mySqlTable("post", {
id: serial("id").primaryKey(),
title: varchar("name", { length: 256 }).notNull(),
content: varchar("content", { length: 256 }).notNull(),
createdAt: timestamp("created_at")
.default(sql`CURRENT_TIMESTAMP`)
.notNull(),
updatedAt: timestamp("updatedAt").onUpdateNow(),
});