Commit 4d8fccfa authored by Cédric de Saint Martin's avatar Cédric de Saint Martin Committed by Rafael Monnerat

proxy: add multi-nodes support.

parent 82f2b511
--version:10 --version:11
CREATE TABLE IF NOT EXISTS software%(version)s (url VARCHAR(255) UNIQUE); CREATE TABLE IF NOT EXISTS software%(version)s (
url VARCHAR(255),
computer_reference VARCHAR(255) DEFAULT 'computer',
CONSTRAINT uniq PRIMARY KEY (url, computer_reference)
);
CREATE TABLE IF NOT EXISTS computer%(version)s ( CREATE TABLE IF NOT EXISTS computer%(version)s (
reference VARCHAR(255),
address VARCHAR(255), address VARCHAR(255),
netmask VARCHAR(255), netmask VARCHAR(255),
CONSTRAINT uniq PRIMARY KEY (address, netmask)); CONSTRAINT uniq PRIMARY KEY (reference)
);
CREATE TABLE IF NOT EXISTS partition%(version)s ( CREATE TABLE IF NOT EXISTS partition%(version)s (
reference VARCHAR(255) UNIQUE, reference VARCHAR(255),
computer_reference VARCHAR(255) DEFAULT 'computer',
slap_state VARCHAR(255) DEFAULT 'free', slap_state VARCHAR(255) DEFAULT 'free',
software_release VARCHAR(255), software_release VARCHAR(255),
xml TEXT, xml TEXT,
...@@ -16,11 +24,13 @@ CREATE TABLE IF NOT EXISTS partition%(version)s ( ...@@ -16,11 +24,13 @@ CREATE TABLE IF NOT EXISTS partition%(version)s (
partition_reference VARCHAR(255), partition_reference VARCHAR(255),
requested_by VARCHAR(255), -- only used for debugging, requested_by VARCHAR(255), -- only used for debugging,
-- slapproxy does not support proper scope -- slapproxy does not support proper scope
requested_state VARCHAR(255) NOT NULL DEFAULT 'started' requested_state VARCHAR(255) NOT NULL DEFAULT 'started',
CONSTRAINT uniq PRIMARY KEY (reference, computer_reference)
); );
CREATE TABLE IF NOT EXISTS slave%(version)s ( CREATE TABLE IF NOT EXISTS slave%(version)s (
reference VARCHAR(255) UNIQUE, reference VARCHAR(255),
computer_reference VARCHAR(255),
connection_xml TEXT, connection_xml TEXT,
hosted_by VARCHAR(255), hosted_by VARCHAR(255),
asked_by VARCHAR(255) -- only used for debugging, asked_by VARCHAR(255) -- only used for debugging,
...@@ -29,6 +39,7 @@ CREATE TABLE IF NOT EXISTS slave%(version)s ( ...@@ -29,6 +39,7 @@ CREATE TABLE IF NOT EXISTS slave%(version)s (
CREATE TABLE IF NOT EXISTS partition_network%(version)s ( CREATE TABLE IF NOT EXISTS partition_network%(version)s (
partition_reference VARCHAR(255), partition_reference VARCHAR(255),
computer_reference VARCHAR(255),
reference VARCHAR(255), reference VARCHAR(255),
address VARCHAR(255), address VARCHAR(255),
netmask VARCHAR(255) netmask VARCHAR(255)
......
This diff is collapsed.
This diff is collapsed.
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