File tree Expand file tree Collapse file tree 4 files changed +22
-1
lines changed Expand file tree Collapse file tree 4 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 1
1
# multi-tenant-sql
2
2
3
- SQL starters for building multi tenant applications with MySQL, PostgreSQL and SQLite.
3
+ SQL starters for building multi tenant applications with MySQL, PostgreSQL and SQLite. The
4
4
5
5
## How to use this
6
6
Original file line number Diff line number Diff line change
1
+ CREATE TABLE IF NOT EXISTS ` organization` (
2
+ ` id` bigint NOT NULL AUTO_INCREMENT,
3
+ ` name` VARCHAR (255 ) NOT NULL ,
4
+ ` created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
5
+ ` updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
6
+ PRIMARY KEY (` id` )
7
+ ) ENGINE= InnoDB DEFAULT CHARSET= utf8mb4 COLLATE= utf8mb4_0900_ai_ci;
8
+
9
+ CREATE TABLE IF NOT EXISTS ` membership` (
10
+ ` id` BIGINT NOT NULL AUTO_INCREMENT,
11
+ ` created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
12
+ ` updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
13
+ PRIMARY KEY (` id` )
14
+ ) ENGINE= InnoDB DEFAULT CHARSET= utf8mb4 COLLATE= utf8mb4_0900_ai_ci;
15
+
16
+ CREATE TABLE IF NOT EXISTS ` user` (
17
+ ` id` BIGINT NOT NULL AUTO_INCREMENT,
18
+ ` created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
19
+ ` updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
20
+ PRIMARY KEY (` id` )
21
+ ) ENGINE= InnoDB DEFAULT CHARSET= utf8mb4 COLLATE= utf8mb4_0900_ai_ci;
You can’t perform that action at this time.
0 commit comments