feat: add start command

This commit is contained in:
Mauricio Siu 2024-07-12 23:58:05 -06:00
parent adc9e6d804
commit 7c049cf438
4 changed files with 140 additions and 51 deletions

View File

@ -0,0 +1,9 @@
CREATE TABLE `t3_post` (
`id` bigint AUTO_INCREMENT NOT NULL,
`name` varchar(256),
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp ON UPDATE CURRENT_TIMESTAMP,
CONSTRAINT `t3_post_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
CREATE INDEX `name_idx` ON `t3_post` (`name`);

View File

@ -0,0 +1,67 @@
{
"version": "5",
"dialect": "mysql",
"id": "2edc6673-4688-44c9-8e45-c54e5ff0f133",
"prevId": "00000000-0000-0000-0000-000000000000",
"tables": {
"t3_post": {
"name": "t3_post",
"columns": {
"id": {
"name": "id",
"type": "bigint",
"primaryKey": false,
"notNull": true,
"autoincrement": true
},
"name": {
"name": "name",
"type": "varchar(256)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"onUpdate": true
}
},
"indexes": {
"name_idx": {
"name": "name_idx",
"columns": [
"name"
],
"isUnique": false
}
},
"foreignKeys": {},
"compositePrimaryKeys": {
"t3_post_id": {
"name": "t3_post_id",
"columns": [
"id"
]
}
},
"uniqueConstraints": {}
}
},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
}
}

View File

@ -0,0 +1,13 @@
{
"version": "6",
"dialect": "mysql",
"entries": [
{
"idx": 0,
"version": "5",
"when": 1720850249392,
"tag": "0000_foamy_korg",
"breakpoints": true
}
]
}

View File

@ -11,7 +11,7 @@
"db:studio": "drizzle-kit studio", "db:studio": "drizzle-kit studio",
"dev": "next dev", "dev": "next dev",
"lint": "next lint", "lint": "next lint",
"start": "next start" "start": "pnpm run db:migrate && next start"
}, },
"dependencies": { "dependencies": {
"@t3-oss/env-nextjs": "^0.10.1", "@t3-oss/env-nextjs": "^0.10.1",