-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a019d5
commit d085705
Showing
7 changed files
with
634 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
CREATE TABLE `varieties` ( | ||
`id` serial AUTO_INCREMENT NOT NULL, | ||
`created_at` timestamp DEFAULT (now()), | ||
`name` varchar(255), | ||
`processing` varchar(255), | ||
`country` varchar(255), | ||
`region` varchar(255), | ||
`farm` varchar(255), | ||
`farmer` varchar(255), | ||
`elevation` varchar(80), | ||
`bean_id` int NOT NULL, | ||
CONSTRAINT `varieties_id` PRIMARY KEY(`id`) | ||
); | ||
--> statement-breakpoint | ||
CREATE TABLE `beans` ( | ||
`id` serial AUTO_INCREMENT NOT NULL, | ||
`public_id` varchar(12), | ||
`created_at` timestamp DEFAULT (now()), | ||
`name` varchar(255) NOT NULL, | ||
`roast_date` date, | ||
`buy_date` date, | ||
`external_id` varchar(255), | ||
`notes` text, | ||
`weight` decimal(10,2), | ||
`price` decimal(10,2), | ||
`roaster_id` int NOT NULL, | ||
`is_public` boolean DEFAULT false, | ||
`is_archived` boolean DEFAULT false, | ||
`user_id` int NOT NULL, | ||
CONSTRAINT `beans_id` PRIMARY KEY(`id`) | ||
); | ||
--> statement-breakpoint | ||
CREATE TABLE `roasters` ( | ||
`id` serial AUTO_INCREMENT NOT NULL, | ||
`public_id` varchar(12), | ||
`name` varchar(255), | ||
`user_id` int NOT NULL, | ||
CONSTRAINT `roasters_id` PRIMARY KEY(`id`) | ||
); | ||
--> statement-breakpoint | ||
CREATE TABLE `users` ( | ||
`id` serial AUTO_INCREMENT NOT NULL, | ||
`public_id` varchar(12) NOT NULL, | ||
`userId` varchar(191) NOT NULL, | ||
`email` varchar(255), | ||
`username` varchar(255), | ||
CONSTRAINT `users_id` PRIMARY KEY(`id`) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,313 @@ | ||
{ | ||
"version": "5", | ||
"dialect": "mysql", | ||
"id": "ba87d6b1-944c-4a2a-a20f-e47e2214fd10", | ||
"prevId": "00000000-0000-0000-0000-000000000000", | ||
"tables": { | ||
"varieties": { | ||
"name": "varieties", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "serial", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": true | ||
}, | ||
"created_at": { | ||
"name": "created_at", | ||
"type": "timestamp", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false, | ||
"default": "(now())" | ||
}, | ||
"name": { | ||
"name": "name", | ||
"type": "varchar(255)", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"processing": { | ||
"name": "processing", | ||
"type": "varchar(255)", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"country": { | ||
"name": "country", | ||
"type": "varchar(255)", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"region": { | ||
"name": "region", | ||
"type": "varchar(255)", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"farm": { | ||
"name": "farm", | ||
"type": "varchar(255)", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"farmer": { | ||
"name": "farmer", | ||
"type": "varchar(255)", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"elevation": { | ||
"name": "elevation", | ||
"type": "varchar(80)", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"bean_id": { | ||
"name": "bean_id", | ||
"type": "int", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
} | ||
}, | ||
"indexes": {}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": { | ||
"varieties_id": { | ||
"name": "varieties_id", | ||
"columns": [ | ||
"id" | ||
] | ||
} | ||
}, | ||
"uniqueConstraints": {} | ||
}, | ||
"beans": { | ||
"name": "beans", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "serial", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": true | ||
}, | ||
"public_id": { | ||
"name": "public_id", | ||
"type": "varchar(12)", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"created_at": { | ||
"name": "created_at", | ||
"type": "timestamp", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false, | ||
"default": "(now())" | ||
}, | ||
"name": { | ||
"name": "name", | ||
"type": "varchar(255)", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"roast_date": { | ||
"name": "roast_date", | ||
"type": "date", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"buy_date": { | ||
"name": "buy_date", | ||
"type": "date", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"external_id": { | ||
"name": "external_id", | ||
"type": "varchar(255)", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"notes": { | ||
"name": "notes", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"weight": { | ||
"name": "weight", | ||
"type": "decimal(10,2)", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"price": { | ||
"name": "price", | ||
"type": "decimal(10,2)", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"roaster_id": { | ||
"name": "roaster_id", | ||
"type": "int", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"is_public": { | ||
"name": "is_public", | ||
"type": "boolean", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false, | ||
"default": false | ||
}, | ||
"is_archived": { | ||
"name": "is_archived", | ||
"type": "boolean", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false, | ||
"default": false | ||
}, | ||
"user_id": { | ||
"name": "user_id", | ||
"type": "int", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
} | ||
}, | ||
"indexes": {}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": { | ||
"beans_id": { | ||
"name": "beans_id", | ||
"columns": [ | ||
"id" | ||
] | ||
} | ||
}, | ||
"uniqueConstraints": {} | ||
}, | ||
"roasters": { | ||
"name": "roasters", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "serial", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": true | ||
}, | ||
"public_id": { | ||
"name": "public_id", | ||
"type": "varchar(12)", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"name": { | ||
"name": "name", | ||
"type": "varchar(255)", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"user_id": { | ||
"name": "user_id", | ||
"type": "int", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
} | ||
}, | ||
"indexes": {}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": { | ||
"roasters_id": { | ||
"name": "roasters_id", | ||
"columns": [ | ||
"id" | ||
] | ||
} | ||
}, | ||
"uniqueConstraints": {} | ||
}, | ||
"users": { | ||
"name": "users", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "serial", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": true | ||
}, | ||
"public_id": { | ||
"name": "public_id", | ||
"type": "varchar(12)", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"userId": { | ||
"name": "userId", | ||
"type": "varchar(191)", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"email": { | ||
"name": "email", | ||
"type": "varchar(255)", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"username": { | ||
"name": "username", | ||
"type": "varchar(255)", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
} | ||
}, | ||
"indexes": {}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": { | ||
"users_id": { | ||
"name": "users_id", | ||
"columns": [ | ||
"id" | ||
] | ||
} | ||
}, | ||
"uniqueConstraints": {} | ||
} | ||
}, | ||
"schemas": {}, | ||
"_meta": { | ||
"schemas": {}, | ||
"tables": {}, | ||
"columns": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"version": "5", | ||
"dialect": "mysql", | ||
"entries": [ | ||
{ | ||
"idx": 0, | ||
"version": "5", | ||
"when": 1694592334768, | ||
"tag": "0000_long_pete_wisdom", | ||
"breakpoints": true | ||
} | ||
] | ||
} |
Oops, something went wrong.