1
0
mirror of https://github.com/newnius/YAO-portal.git synced 2025-12-13 09:06:43 +00:00

update, add cluster management

This commit is contained in:
2019-05-20 16:53:28 +08:00
parent 3da19d214f
commit 2dfe3f52d0
5 changed files with 211 additions and 22 deletions

View File

@@ -16,7 +16,6 @@ MysqlPDO::configure($config);
create_table_user();
create_table_workspace();
create_table_cluster();
create_table_agent();
create_table_model();
create_table_log();
@@ -71,25 +70,6 @@ function create_table_workspace()
execute_sqls($sqls);
}
function create_table_cluster()
{
$sqls = array(
// 'DROP `yao_cluster`' => 'DROP TABLE IF EXISTS `yao_cluster`',
'CREATE `yao_cluster`' =>
'CREATE TABLE `yao_cluster`(
`name` VARCHAR(64) NOT NULL,
PRIMARY KEY(`name`),
`created_at` BIGINT NOT NULL,
`created_by` int NOT NULL,
`reserved_nodes` json NOT NULL,
`quota_per_day` int NOT NULL,
`quota_used` int NOT NULL,
`version` int NOT NULL DEFAULT 0 /* for upgrade purpose */
)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci',
);
execute_sqls($sqls);
}
function create_table_agent()
{
$sqls = array(