Skip to content

Commit

Permalink
Merge pull request #1 from Azure-Blade/fix
Browse files Browse the repository at this point in the history
fixes
  • Loading branch information
PlamenErmenkov authored Jun 11, 2024
2 parents 55a963f + 647e971 commit c7e0f6a
Show file tree
Hide file tree
Showing 35 changed files with 802 additions and 284 deletions.
5 changes: 4 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
AUTH_SECRET=0cGJ5qnt9xRo2/E9cZB2TjUefAtz6B78+vItPv4DKPI=
DB_HOST=oracle.netbird.cloud
DB_USER=project-b
DB_PASSWORD=YCNeqYguf8K6yp
DB_DATABASE=project-b
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "next/core-web-vitals"
"extends": ["next/core-web-vitals", "prettier"]
}
9 changes: 9 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"trailingComma": "none",
"semi": true,
"tabWidth": 2,
"singleQuote": true,
"arrowParens": "avoid",
"jsxSingleQuote": true,
"plugins": ["prettier-plugin-tailwindcss"]
}
12 changes: 7 additions & 5 deletions drizzle.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { env } from '@/env';
import { defineConfig } from 'drizzle-kit';

export default defineConfig({
schema: './src/schema.ts',
out: './drizzle',
dialect: 'mysql',
dbCredentials: {
host: "localhost",
user: "root",
database: "projectb",
},
});
host: env.DB_HOST,
user: env.DB_USER,
database: env.DB_DATABASE,
password: env.DB_PASSWORD
}
});
1 change: 1 addition & 0 deletions drizzle/0005_chemical_phantom_reporter.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE `session` MODIFY COLUMN `userId` int NOT NULL;
1 change: 1 addition & 0 deletions drizzle/0006_perpetual_alex_power.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE `session` MODIFY COLUMN `timestamp` timestamp(6) DEFAULT (now());
6 changes: 2 additions & 4 deletions drizzle/meta/0000_snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@
"compositePrimaryKeys": {
"blogs_id": {
"name": "blogs_id",
"columns": [
"id"
]
"columns": ["id"]
}
},
"uniqueConstraints": {}
Expand All @@ -51,4 +49,4 @@
"tables": {},
"indexes": {}
}
}
}
10 changes: 3 additions & 7 deletions drizzle/meta/0001_snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@
"compositePrimaryKeys": {
"blogs_id": {
"name": "blogs_id",
"columns": [
"id"
]
"columns": ["id"]
}
},
"uniqueConstraints": {}
Expand Down Expand Up @@ -78,9 +76,7 @@
"compositePrimaryKeys": {
"user_id": {
"name": "user_id",
"columns": [
"id"
]
"columns": ["id"]
}
},
"uniqueConstraints": {}
Expand All @@ -95,4 +91,4 @@
"tables": {},
"indexes": {}
}
}
}
10 changes: 3 additions & 7 deletions drizzle/meta/0002_snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@
"compositePrimaryKeys": {
"blogs_id": {
"name": "blogs_id",
"columns": [
"id"
]
"columns": ["id"]
}
},
"uniqueConstraints": {}
Expand Down Expand Up @@ -92,9 +90,7 @@
"compositePrimaryKeys": {
"user_id": {
"name": "user_id",
"columns": [
"id"
]
"columns": ["id"]
}
},
"uniqueConstraints": {}
Expand All @@ -109,4 +105,4 @@
"tables": {},
"indexes": {}
}
}
}
14 changes: 4 additions & 10 deletions drizzle/meta/0003_snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@
"compositePrimaryKeys": {
"blogs_id": {
"name": "blogs_id",
"columns": [
"id"
]
"columns": ["id"]
}
},
"uniqueConstraints": {}
Expand Down Expand Up @@ -71,9 +69,7 @@
"compositePrimaryKeys": {
"session_id": {
"name": "session_id",
"columns": [
"id"
]
"columns": ["id"]
}
},
"uniqueConstraints": {}
Expand Down Expand Up @@ -129,9 +125,7 @@
"compositePrimaryKeys": {
"user_id": {
"name": "user_id",
"columns": [
"id"
]
"columns": ["id"]
}
},
"uniqueConstraints": {}
Expand All @@ -146,4 +140,4 @@
"tables": {},
"indexes": {}
}
}
}
22 changes: 6 additions & 16 deletions drizzle/meta/0004_snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@
"compositePrimaryKeys": {
"blogs_id": {
"name": "blogs_id",
"columns": [
"id"
]
"columns": ["id"]
}
},
"uniqueConstraints": {}
Expand Down Expand Up @@ -79,22 +77,16 @@
"name": "session_userId_user_id_fk",
"tableFrom": "session",
"tableTo": "user",
"columnsFrom": [
"userId"
],
"columnsTo": [
"id"
],
"columnsFrom": ["userId"],
"columnsTo": ["id"],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"session_id": {
"name": "session_id",
"columns": [
"id"
]
"columns": ["id"]
}
},
"uniqueConstraints": {}
Expand Down Expand Up @@ -150,9 +142,7 @@
"compositePrimaryKeys": {
"user_id": {
"name": "user_id",
"columns": [
"id"
]
"columns": ["id"]
}
},
"uniqueConstraints": {}
Expand All @@ -167,4 +157,4 @@
"tables": {},
"indexes": {}
}
}
}
160 changes: 160 additions & 0 deletions drizzle/meta/0005_snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
{
"version": "5",
"dialect": "mysql",
"id": "bffda20b-2622-4b75-84ea-4fca92d7ef2b",
"prevId": "d5d66241-ba07-4c3c-b17f-effa97d48daf",
"tables": {
"blogs": {
"name": "blogs",
"columns": {
"id": {
"name": "id",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": true
},
"title": {
"name": "title",
"type": "varchar(64)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"content": {
"name": "content",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"blogs_id": {
"name": "blogs_id",
"columns": ["id"]
}
},
"uniqueConstraints": {}
},
"session": {
"name": "session",
"columns": {
"id": {
"name": "id",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": true
},
"token": {
"name": "token",
"type": "varchar(64)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"userId": {
"name": "userId",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"timestamp": {
"name": "timestamp",
"type": "timestamp(6)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {
"session_userId_user_id_fk": {
"name": "session_userId_user_id_fk",
"tableFrom": "session",
"tableTo": "user",
"columnsFrom": ["userId"],
"columnsTo": ["id"],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"session_id": {
"name": "session_id",
"columns": ["id"]
}
},
"uniqueConstraints": {}
},
"user": {
"name": "user",
"columns": {
"id": {
"name": "id",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": true
},
"email": {
"name": "email",
"type": "varchar(320)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"username": {
"name": "username",
"type": "varchar(64)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"password": {
"name": "password",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"verified": {
"name": "verified",
"type": "boolean",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"activationToken": {
"name": "activationToken",
"type": "varchar(64)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"user_id": {
"name": "user_id",
"columns": ["id"]
}
},
"uniqueConstraints": {}
}
},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
},
"internal": {
"tables": {},
"indexes": {}
}
}
Loading

0 comments on commit c7e0f6a

Please sign in to comment.