CREATE TABLE vips (
 id INTEGER PRIMARY KEY NOT NULL,
 name VARCHAR(255) NOT NULL,
 addr VARCHAR(255) NOT NULL,
 status TINYINT NOT NULL
);

CREATE TABLE vip_services (
 id INTEGER PRIMARY KEY NOT NULL,
 vip_id INTEGER NOT NULL,
 type TINYINT NOT NULL,
 port INTEGER NOT NULL,
 service_group INTEGER NOT NULL,
 status TINYINT NOT NULL
);

CREATE TABLE service_groups (
 id INTEGER PRIMARY KEY NOT NULL,
 type TINYINT NOT NULL,
 lb_method TINYINT NOT NULL,
 status TINYINT NOT NULL,
);

CREATE TABLE sg_matrix (
 id INTEGER PRIMARY KEY NOT NULL,
 sg_id  INTEGER NOT NULL,
 mem_id INTEGER NOT NULL
);

CREATE TABLE sg_members {
 id INTEGER PRIMARY KEY NOT NULL,
 addr VARCHAR(255) NOT NULL,
 port INTEGER NOT NOT NULL,
 status TINYINT NOT NULL,
);
