chore: db migration
This commit is contained in:
parent
d4cfd138d9
commit
b3277c8560
4 changed files with 32 additions and 11 deletions
|
|
@ -0,0 +1,12 @@
|
||||||
|
/*
|
||||||
|
Warnings:
|
||||||
|
|
||||||
|
- You are about to drop the column `componentId` on the `RoleMenuComponentPermission` table. All the data in the column will be lost.
|
||||||
|
- You are about to drop the column `componentTag` on the `RoleMenuComponentPermission` table. All the data in the column will be lost.
|
||||||
|
- Added the required column `userRole` to the `RoleMenuComponentPermission` table without a default value. This is not possible if the table is not empty.
|
||||||
|
|
||||||
|
*/
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "RoleMenuComponentPermission" DROP COLUMN "componentId",
|
||||||
|
DROP COLUMN "componentTag",
|
||||||
|
ADD COLUMN "userRole" TEXT NOT NULL;
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Branch" ADD COLUMN "telephoneHq" TEXT;
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
/*
|
||||||
|
Warnings:
|
||||||
|
|
||||||
|
- Made the column `telephoneHq` on table `Branch` required. This step will fail if there are existing NULL values in that column.
|
||||||
|
|
||||||
|
*/
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Branch" ALTER COLUMN "telephoneHq" SET NOT NULL;
|
||||||
|
|
@ -81,14 +81,12 @@ model MenuComponent {
|
||||||
model RoleMenuComponentPermission {
|
model RoleMenuComponentPermission {
|
||||||
id String @id @default(uuid())
|
id String @id @default(uuid())
|
||||||
|
|
||||||
componentId String
|
userRole String
|
||||||
componentTag String
|
permission String
|
||||||
|
|
||||||
menuComponent MenuComponent @relation(fields: [menuComponentId], references: [id])
|
menuComponent MenuComponent @relation(fields: [menuComponentId], references: [id])
|
||||||
menuComponentId String
|
menuComponentId String
|
||||||
|
|
||||||
permission String
|
|
||||||
|
|
||||||
createdBy String?
|
createdBy String?
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updateBy String?
|
updateBy String?
|
||||||
|
|
@ -177,13 +175,14 @@ enum Status {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Branch {
|
model Branch {
|
||||||
id String @id @default(uuid())
|
id String @id @default(uuid())
|
||||||
code String
|
code String
|
||||||
taxNo String
|
taxNo String
|
||||||
name String
|
name String
|
||||||
nameEN String
|
nameEN String
|
||||||
address String
|
address String
|
||||||
addressEN String
|
addressEN String
|
||||||
|
telephoneHq String
|
||||||
|
|
||||||
province Province? @relation(fields: [provinceId], references: [id], onDelete: SetNull)
|
province Province? @relation(fields: [provinceId], references: [id], onDelete: SetNull)
|
||||||
provinceId String?
|
provinceId String?
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue