Skip to content

Commit

Permalink
chore: generate migration
Browse files Browse the repository at this point in the history
  • Loading branch information
CaliCastle committed Jun 14, 2023
1 parent d2333b0 commit e9b81be
Show file tree
Hide file tree
Showing 5 changed files with 261 additions and 2 deletions.
7 changes: 7 additions & 0 deletions db/migrations/0008_violet_the_enforcers.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CREATE TABLE `newsletters` (
`id` serial AUTO_INCREMENT PRIMARY KEY NOT NULL,
`subject` varchar(200),
`body` text,
`sent_at` datetime,
`created_at` timestamp DEFAULT (now()),
`updated_at` timestamp DEFAULT (now()));
243 changes: 243 additions & 0 deletions db/migrations/meta/0008_snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,243 @@
{
"version": "5",
"dialect": "mysql",
"id": "3d1c6321-473a-42df-bccb-ce9f88cabc6d",
"prevId": "32d734bc-2b29-4205-a0d0-75ab4c9ed98c",
"tables": {
"comments": {
"name": "comments",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"user_id": {
"name": "user_id",
"type": "varchar(200)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"user_info": {
"name": "user_info",
"type": "json",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"post_id": {
"name": "post_id",
"type": "varchar(100)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"parent_id": {
"name": "parent_id",
"type": "bigint",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"body": {
"name": "body",
"type": "json",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": "(now())"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": "(now())"
}
},
"indexes": {
"post_idx": {
"name": "post_idx",
"columns": [
"post_id"
],
"isUnique": false
}
},
"foreignKeys": {},
"compositePrimaryKeys": {}
},
"guestbook": {
"name": "guestbook",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"user_id": {
"name": "user_id",
"type": "varchar(200)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"user_info": {
"name": "user_info",
"type": "json",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"message": {
"name": "message",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": "(now())"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": "(now())"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {}
},
"newsletters": {
"name": "newsletters",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"subject": {
"name": "subject",
"type": "varchar(200)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"body": {
"name": "body",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"sent_at": {
"name": "sent_at",
"type": "datetime",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": "(now())"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": "(now())"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {}
},
"subscribers": {
"name": "subscribers",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"email": {
"name": "email",
"type": "varchar(120)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"token": {
"name": "token",
"type": "varchar(50)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"subscribed_at": {
"name": "subscribed_at",
"type": "datetime",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"unsubscribed_at": {
"name": "unsubscribed_at",
"type": "datetime",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"updated_at": {
"name": "updated_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": "(now())"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {}
}
},
"schemas": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
}
}
7 changes: 7 additions & 0 deletions db/migrations/meta/_journal.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@
"when": 1686234041099,
"tag": "0007_robust_sersi",
"breakpoints": false
},
{
"idx": 8,
"version": "5",
"when": 1686736025347,
"tag": "0008_violet_the_enforcers",
"breakpoints": false
}
]
}
1 change: 0 additions & 1 deletion todos.md

This file was deleted.

5 changes: 4 additions & 1 deletion vercel.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"buildCommand": "pnpm turbo build"
"buildCommand": "pnpm turbo build",
"github": {
"silent": true
}
}

0 comments on commit e9b81be

Please sign in to comment.