Commit 72caf996 authored by Thomas Goirand's avatar Thomas Goirand

Fix db schema so that int don't default to '', which doesn't work in modern mariadb.

parent 63d19d9b
......@@ -7,9 +7,9 @@ $database = array(
"blockdevices" => array(
"vars" => array(
"id" => "int(11) NOT NULL auto_increment",
"machine_id" => "int(11) NOT NULL default ''",
"machine_id" => "int(11) NOT NULL default '0'",
"name" => "varchar(255) NOT NULL default ''",
"size_mb" => "int(11) NOT NULL default ''"
"size_mb" => "int(11) NOT NULL default '0'"
),
"primary" => "(id)"
),
......@@ -38,7 +38,7 @@ $database = array(
"ifnames" => array(
"vars" => array(
"id" => "int(11) NOT NULL auto_increment",
"machine_id" => "int(11) NOT NULL default ''",
"machine_id" => "int(11) NOT NULL default '0'",
"name" => "varchar(255) NOT NULL default ''",
"macaddr" => "varchar(20) NOT NULL default ''",
"max_speed" => "int(11) NOT NULL default '10'"
......@@ -48,10 +48,10 @@ $database = array(
"ips" => array(
"vars" => array(
"id" => "int(11) NOT NULL auto_increment",
"network" => "int(11) NOT NULL default ''",
"ip" => "bigint(128) NOT NULL default ''",
"network" => "int(11) NOT NULL default '0'",
"ip" => "bigint(128) NOT NULL default '0'",
"type" => "enum('4','6') NOT NULL default '4'",
"machine" => "int(11) NOT NULL default ''",
"machine" => "int(11) NOT NULL default '0'",
"usefor" => "enum('machine','vip') NOT NULL default 'machine'"
),
"primary" => "(id)",
......@@ -108,7 +108,7 @@ $database = array(
"id" => "int(11) NOT NULL auto_increment",
"name" => "varchar(128) NOT NULL default ''",
"ip" => "varchar(64) NOT NULL default ''",
"cidr" => "int(3) NOT NULL default ''",
"cidr" => "int(3) NOT NULL default '0'",
"is_public" => "enum('yes','no') NOT NULL default 'no'",
"cluster" => "int(11) NULL default NULL",
"role" => "varchar(64) NULL default NULL",
......@@ -127,7 +127,7 @@ $database = array(
"passwords" => array(
"vars" => array(
"id" => "int(11) NOT NULL auto_increment",
"cluster" => "int(11) NOT NULL default ''",
"cluster" => "int(11) NOT NULL default '0'",
"service" => "varchar(64) NOT NULL default ''",
"passtype" => "varchar(64) NOT NULL default ''",
"pass" => "varchar(128) NOT NULL default ''",
......@@ -139,9 +139,9 @@ $database = array(
"rolecounts" => array(
"vars" => array(
"id" => "int(11) NOT NULL auto_increment",
"cluster" => "int(11) NOT NULL default ''",
"role" => "int(11) NOT NULL default ''",
"count" => "int(11) NOT NULL default ''"
"cluster" => "int(11) NOT NULL default '0'",
"role" => "int(11) NOT NULL default '0'",
"count" => "int(11) NOT NULL default '0'"
),
"primary" => "(id)",
"keys" => array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment