add blockindex table

This commit is contained in:
fasiondog 2024-04-22 22:32:51 +08:00
parent 813eea963b
commit 862cdea36a
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,4 @@
CREATE TABLE IF NOT EXISTS `hku_base`.`BlockIndex` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `category` VARCHAR(100) NOT NULL, `name` VARCHAR(100) NOT NULL, `market_code` VARCHAR(30) NOT NULL, PRIMARY KEY (`id`), INDEX `ix_block` (`category`, `name`)
) COLLATE = 'utf8mb4_general_ci' ENGINE = InnoDB;
UPDATE `hku_base`.`version` set `version` = 16;

View File

@ -0,0 +1,16 @@
BEGIN TRANSACTION;
CREATE TABLE
IF NOT EXISTS `BlockIndex` (
"id" INTEGER,
`category` VARCHAR(100) NOT NULL,
`name` VARCHAR(100) NOT NULL,
`market_code` VARCHAR(30) NOT NULL,
PRIMARY KEY("id" AUTOINCREMENT)
);
CREATE INDEX "ix_blockindex_category_name" ON "block" (category, name);
UPDATE `version` set `version` = 17;
COMMIT;