Skip to content

Commit

Permalink
Update schema 2
Browse files Browse the repository at this point in the history
  • Loading branch information
mauriciabad committed Oct 25, 2023
1 parent 2d6174c commit e48dba4
Show file tree
Hide file tree
Showing 3 changed files with 341 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drizzle/0004_colorful_black_widow.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CREATE TABLE `place_translation` (
`id` serial AUTO_INCREMENT NOT NULL,
`place_id` int NOT NULL,
`locale` varchar(10) NOT NULL,
`name` text NOT NULL,
CONSTRAINT `place_translation_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
RENAME TABLE `place` TO `place_data`;--> statement-breakpoint
ALTER TABLE `place_data` DROP COLUMN `name`;
324 changes: 324 additions & 0 deletions drizzle/meta/0004_snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,324 @@
{
"version": "5",
"dialect": "mysql",
"id": "f499ec69-31cc-41e0-a681-e3259ddd180b",
"prevId": "aea0cf0a-32d1-453e-b0e7-2419b3070b31",
"tables": {
"place_data": {
"name": "place_data",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": false,
"notNull": true,
"autoincrement": true
},
"mainImage": {
"name": "mainImage",
"type": "varchar(1024)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"place_data_id": {
"name": "place_data_id",
"columns": [
"id"
]
}
},
"uniqueConstraints": {}
},
"place_translation": {
"name": "place_translation",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": false,
"notNull": true,
"autoincrement": true
},
"place_id": {
"name": "place_id",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"locale": {
"name": "locale",
"type": "varchar(10)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"place_translation_id": {
"name": "place_translation_id",
"columns": [
"id"
]
}
},
"uniqueConstraints": {}
},
"account": {
"name": "account",
"columns": {
"userId": {
"name": "userId",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"type": {
"name": "type",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"provider": {
"name": "provider",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"providerAccountId": {
"name": "providerAccountId",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"refresh_token": {
"name": "refresh_token",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"access_token": {
"name": "access_token",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"expires_at": {
"name": "expires_at",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"token_type": {
"name": "token_type",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"scope": {
"name": "scope",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"id_token": {
"name": "id_token",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"session_state": {
"name": "session_state",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"account_provider_providerAccountId": {
"name": "account_provider_providerAccountId",
"columns": [
"provider",
"providerAccountId"
]
}
},
"uniqueConstraints": {}
},
"session": {
"name": "session",
"columns": {
"sessionToken": {
"name": "sessionToken",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"userId": {
"name": "userId",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"expires": {
"name": "expires",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"session_sessionToken": {
"name": "session_sessionToken",
"columns": [
"sessionToken"
]
}
},
"uniqueConstraints": {}
},
"user": {
"name": "user",
"columns": {
"id": {
"name": "id",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"name": {
"name": "name",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"hashedPassword": {
"name": "hashedPassword",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"email": {
"name": "email",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"emailVerified": {
"name": "emailVerified",
"type": "timestamp(3)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"image": {
"name": "image",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"user_id": {
"name": "user_id",
"columns": [
"id"
]
}
},
"uniqueConstraints": {
"user_email_unique": {
"name": "user_email_unique",
"columns": [
"email"
]
}
}
},
"verificationToken": {
"name": "verificationToken",
"columns": {
"identifier": {
"name": "identifier",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"token": {
"name": "token",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"expires": {
"name": "expires",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"verificationToken_identifier_token": {
"name": "verificationToken_identifier_token",
"columns": [
"identifier",
"token"
]
}
},
"uniqueConstraints": {}
}
},
"schemas": {},
"_meta": {
"schemas": {},
"tables": {
"\"place\"": "\"place_data\""
},
"columns": {}
}
}
7 changes: 7 additions & 0 deletions drizzle/meta/_journal.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
"when": 1698187240633,
"tag": "0003_colorful_fat_cobra",
"breakpoints": true
},
{
"idx": 4,
"version": "5",
"when": 1698259327196,
"tag": "0004_colorful_black_widow",
"breakpoints": true
}
]
}

0 comments on commit e48dba4

Please sign in to comment.