mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 08:07:12 +01:00
add name column to share table
This commit is contained in:
parent
8f55ed9da9
commit
63d2bfe118
2 changed files with 4 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ CREATE TABLE "share" (
|
||||||
"share_id" UUID NOT NULL,
|
"share_id" UUID NOT NULL,
|
||||||
"entity_id" UUID NOT NULL,
|
"entity_id" UUID NOT NULL,
|
||||||
"share_type" INTEGER NOT NULL,
|
"share_type" INTEGER NOT NULL,
|
||||||
|
"name" VARCHAR(200) NOT NULL,
|
||||||
"slug" VARCHAR(100) NOT NULL,
|
"slug" VARCHAR(100) NOT NULL,
|
||||||
"parameters" JSONB NOT NULL,
|
"parameters" JSONB NOT NULL,
|
||||||
"created_at" TIMESTAMPTZ(6) DEFAULT CURRENT_TIMESTAMP,
|
"created_at" TIMESTAMPTZ(6) DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
|
@ -21,9 +22,10 @@ CREATE UNIQUE INDEX "share_slug_key" ON "share"("slug");
|
||||||
CREATE INDEX "share_entity_id_idx" ON "share"("entity_id");
|
CREATE INDEX "share_entity_id_idx" ON "share"("entity_id");
|
||||||
|
|
||||||
-- MigrateData
|
-- MigrateData
|
||||||
INSERT INTO "share" (share_id, entity_id, share_type, slug, parameters, created_at)
|
INSERT INTO "share" (share_id, entity_id, name, share_type, slug, parameters, created_at)
|
||||||
SELECT gen_random_uuid(),
|
SELECT gen_random_uuid(),
|
||||||
website_id,
|
website_id,
|
||||||
|
name,
|
||||||
1,
|
1,
|
||||||
share_id,
|
share_id,
|
||||||
'{}'::jsonb,
|
'{}'::jsonb,
|
||||||
|
|
|
||||||
|
|
@ -342,6 +342,7 @@ model Board {
|
||||||
model Share {
|
model Share {
|
||||||
id String @id() @map("share_id") @db.Uuid
|
id String @id() @map("share_id") @db.Uuid
|
||||||
entityId String @map("entity_id") @db.Uuid
|
entityId String @map("entity_id") @db.Uuid
|
||||||
|
name String @db.VarChar(200)
|
||||||
shareType Int @map("share_type") @db.Integer
|
shareType Int @map("share_type") @db.Integer
|
||||||
slug String @unique() @db.VarChar(100)
|
slug String @unique() @db.VarChar(100)
|
||||||
parameters Json
|
parameters Json
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue