mirror of
https://github.com/bitwarden/server.git
synced 2024-12-01 13:43:23 +01:00
46 lines
729 B
MySQL
46 lines
729 B
MySQL
|
ALTER TABLE
|
|||
|
"Grant" RENAME TO "Old_Grant";
|
|||
|
|
|||
|
CREATE TABLE "Grant"
|
|||
|
(
|
|||
|
"Key" TEXT NOT NULL CONSTRAINT "PK_Grant" PRIMARY KEY,
|
|||
|
"Type" TEXT NULL,
|
|||
|
"SubjectId" TEXT NULL,
|
|||
|
"SessionId" TEXT NULL,
|
|||
|
"ClientId" TEXT NULL,
|
|||
|
"Description" TEXT NULL,
|
|||
|
"CreationDate" TEXT NOT NULL,
|
|||
|
"ExpirationDate" TEXT NULL,
|
|||
|
"ConsumedDate" TEXT NULL,
|
|||
|
"Data" TEXT NULL
|
|||
|
);
|
|||
|
|
|||
|
INSERT INTO
|
|||
|
"Grant"
|
|||
|
(
|
|||
|
"Key",
|
|||
|
"Type",
|
|||
|
"SubjectId",
|
|||
|
"SessionId",
|
|||
|
"ClientId",
|
|||
|
"Description",
|
|||
|
"CreationDate",
|
|||
|
"ExpirationDate",
|
|||
|
"ConsumedDate",
|
|||
|
"Data"
|
|||
|
)
|
|||
|
SELECT
|
|||
|
"Key",
|
|||
|
"Type",
|
|||
|
"SubjectId",
|
|||
|
"SessionId",
|
|||
|
"ClientId",
|
|||
|
"Description",
|
|||
|
"CreationDate",
|
|||
|
"ExpirationDate",
|
|||
|
"ConsumedDate",
|
|||
|
"Data"
|
|||
|
FROM "Old_Grant";
|
|||
|
|
|||
|
DROP TABLE "Old_Grant";
|