mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
create and apply mysql migrations
This commit is contained in:
parent
ccfb228509
commit
da7f4cb2d0
6 changed files with 151 additions and 38 deletions
14
db/mysql/migrations/11_add_segment/migration.sql
Normal file
14
db/mysql/migrations/11_add_segment/migration.sql
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
-- CreateTable
|
||||
CREATE TABLE `segment` (
|
||||
`segment_id` VARCHAR(36) NOT NULL,
|
||||
`website_id` VARCHAR(36) NOT NULL,
|
||||
`type` VARCHAR(200) NOT NULL,
|
||||
`name` VARCHAR(200) NOT NULL,
|
||||
`parameters` JSON NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NULL,
|
||||
|
||||
UNIQUE INDEX `segment_segment_id_key`(`segment_id`),
|
||||
INDEX `segment_website_id_idx`(`website_id`),
|
||||
PRIMARY KEY (`segment_id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
Loading…
Add table
Add a link
Reference in a new issue