CREATE DATABASE IF NOT EXISTS detector DEFAULT CHARACTER SET = 'utf8mb4';

USE detector;

CREATE TABLE IF NOT EXISTS detector (
    id INT NOT NULL PRIMARY KEY AUTO_INCREMENT COMMENT '自动增长id',
    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'created time',
    name VARCHAR(256) NOT NULL COMMENT '名字',
    etcd VARCHAR(1024) NOT NULL COMMENT 'etcd地址',
    kafka VARCHAR(1024) NOT NULL COMMENT 'kafka地址',
    kafka_replicas INT NOT NULL COMMENT 'kafka topic副本数'
) COMMENT '注册发现';