mirror of
https://github.com/bitwarden/server.git
synced 2024-11-28 13:15:12 +01:00
47 lines
749 B
MySQL
47 lines
749 B
MySQL
|
ALTER TABLE
|
|||
|
"Grant" RENAME TO "Old_Grant";
|
|||
|
|
|||
|
CREATE TABLE "Grant"
|
|||
|
(
|
|||
|
"Id" INTEGER PRIMARY KEY AUTOINCREMENT,
|
|||
|
"Key" TEXT NOT NULL,
|
|||
|
"Type" TEXT NOT NULL,
|
|||
|
"SubjectId" TEXT NULL,
|
|||
|
"SessionId" TEXT NULL,
|
|||
|
"ClientId" TEXT NOT NULL,
|
|||
|
"Description" TEXT NULL,
|
|||
|
"CreationDate" TEXT NOT NULL,
|
|||
|
"ExpirationDate" TEXT NULL,
|
|||
|
"ConsumedDate" TEXT NULL,
|
|||
|
"Data" TEXT NOT 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";
|