mirror of
https://github.com/getnamingo/registry.git
synced 2025-06-27 22:53:34 +02:00
Milliseconds are now fully supported
This commit is contained in:
parent
ea754362f8
commit
63aa36ff0a
13 changed files with 425 additions and 321 deletions
|
@ -43,7 +43,7 @@ CREATE TABLE registry.error_log (
|
|||
"id" INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
"registrar_id" INT(11) NOT NULL,
|
||||
"log" TEXT NOT NULL,
|
||||
"date" TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
"date" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE TABLE registry.reserved_domain_names (
|
||||
|
@ -72,8 +72,8 @@ CREATE TABLE registry.registrar (
|
|||
"creditthreshold" decimal(8,2) NOT NULL default '0.00',
|
||||
"thresholdtype" varchar CHECK ("thresholdtype" IN ( 'fixed','percent' )) NOT NULL default 'fixed',
|
||||
"currency" varchar(5) NOT NULL,
|
||||
"crdate" timestamp without time zone NOT NULL,
|
||||
"update" TIMESTAMP ,
|
||||
"crdate" timestamp(3) without time zone NOT NULL,
|
||||
"update" timestamp(3),
|
||||
primary key ("id"),
|
||||
unique ("clid") ,
|
||||
unique ("prefix") ,
|
||||
|
@ -125,16 +125,16 @@ CREATE TABLE registry.registrar_contact (
|
|||
CREATE TABLE registry.poll (
|
||||
"id" serial8,
|
||||
"registrar_id" int CHECK ("registrar_id" >= 0) NOT NULL,
|
||||
"qdate" timestamp without time zone NOT NULL,
|
||||
"qdate" timestamp(3) without time zone NOT NULL,
|
||||
"msg" text default NULL,
|
||||
"msg_type" varchar CHECK ("msg_type" IN ( 'lowBalance','domainTransfer','contactTransfer' )) default NULL,
|
||||
"obj_name_or_id" varchar(68),
|
||||
"obj_trstatus" varchar CHECK ("obj_trstatus" IN ( 'clientApproved','clientCancelled','clientRejected','pending','serverApproved','serverCancelled' )) default NULL,
|
||||
"obj_reid" varchar(255),
|
||||
"obj_redate" timestamp without time zone,
|
||||
"obj_redate" timestamp(3) without time zone,
|
||||
"obj_acid" varchar(255),
|
||||
"obj_acdate" timestamp without time zone,
|
||||
"obj_exdate" timestamp without time zone default NULL,
|
||||
"obj_acdate" timestamp(3) without time zone,
|
||||
"obj_exdate" timestamp(3) without time zone default NULL,
|
||||
"registrarname" varchar(255),
|
||||
"creditlimit" decimal(8,2) default '0.00',
|
||||
"creditthreshold" decimal(8,2) default '0.00',
|
||||
|
@ -146,7 +146,7 @@ CREATE TABLE registry.poll (
|
|||
CREATE TABLE registry.payment_history (
|
||||
"id" serial8,
|
||||
"registrar_id" int CHECK ("registrar_id" >= 0) NOT NULL,
|
||||
"date" timestamp without time zone NOT NULL,
|
||||
"date" timestamp(3) without time zone NOT NULL,
|
||||
"description" text NOT NULL,
|
||||
"amount" decimal(8,2) NOT NULL,
|
||||
primary key ("id")
|
||||
|
@ -155,12 +155,12 @@ CREATE TABLE registry.payment_history (
|
|||
CREATE TABLE registry.statement (
|
||||
"id" serial8,
|
||||
"registrar_id" int CHECK ("registrar_id" >= 0) NOT NULL,
|
||||
"date" timestamp without time zone NOT NULL,
|
||||
"date" timestamp(3) without time zone NOT NULL,
|
||||
"command" varchar CHECK ("command" IN ( 'create','renew','transfer','restore','autoRenew' )) NOT NULL default 'create',
|
||||
"domain_name" varchar(68) NOT NULL,
|
||||
"length_in_months" smallint CHECK ("length_in_months" >= 0) NOT NULL,
|
||||
"from" timestamp without time zone NOT NULL,
|
||||
"to" timestamp without time zone NOT NULL,
|
||||
"from" timestamp(3) without time zone NOT NULL,
|
||||
"to" timestamp(3) without time zone NOT NULL,
|
||||
"amount" decimal(8,2) NOT NULL,
|
||||
primary key ("id")
|
||||
);
|
||||
|
@ -177,15 +177,15 @@ CREATE TABLE registry.contact (
|
|||
"nin_type" varchar CHECK ("nin_type" IN ( 'personal','business' )) default NULL,
|
||||
"clid" int CHECK ("clid" >= 0) NOT NULL,
|
||||
"crid" int CHECK ("crid" >= 0) NOT NULL,
|
||||
"crdate" timestamp without time zone NOT NULL,
|
||||
"crdate" timestamp(3) without time zone NOT NULL,
|
||||
"upid" int CHECK ("upid" >= 0) default NULL,
|
||||
"update" timestamp without time zone default NULL,
|
||||
"trdate" timestamp without time zone default NULL,
|
||||
"update" timestamp(3) without time zone default NULL,
|
||||
"trdate" timestamp(3) without time zone default NULL,
|
||||
"trstatus" varchar CHECK ("trstatus" IN ( 'clientApproved','clientCancelled','clientRejected','pending','serverApproved','serverCancelled' )) default NULL,
|
||||
"reid" int CHECK ("reid" >= 0) default NULL,
|
||||
"redate" timestamp without time zone default NULL,
|
||||
"redate" timestamp(3) without time zone default NULL,
|
||||
"acid" int CHECK ("acid" >= 0) default NULL,
|
||||
"acdate" timestamp without time zone default NULL,
|
||||
"acdate" timestamp(3) without time zone default NULL,
|
||||
"disclose_voice" varchar CHECK ("disclose_voice" IN ( '0','1' )) NOT NULL default '1',
|
||||
"disclose_fax" varchar CHECK ("disclose_fax" IN ( '0','1' )) NOT NULL default '1',
|
||||
"disclose_email" varchar CHECK ("disclose_email" IN ( '0','1' )) NOT NULL default '1',
|
||||
|
@ -238,26 +238,26 @@ CREATE TABLE registry.domain (
|
|||
"name" varchar(68) NOT NULL,
|
||||
"tldid" int CHECK ("tldid" >= 0) NOT NULL,
|
||||
"registrant" int CHECK ("registrant" >= 0) default NULL,
|
||||
"crdate" timestamp without time zone NOT NULL,
|
||||
"exdate" timestamp without time zone NOT NULL,
|
||||
"update" timestamp without time zone default NULL,
|
||||
"crdate" timestamp(3) without time zone NOT NULL,
|
||||
"exdate" timestamp(3) without time zone NOT NULL,
|
||||
"update" timestamp(3) without time zone default NULL,
|
||||
"clid" int CHECK ("clid" >= 0) NOT NULL,
|
||||
"crid" int CHECK ("crid" >= 0) NOT NULL,
|
||||
"upid" int CHECK ("upid" >= 0) default NULL,
|
||||
"trdate" timestamp without time zone default NULL,
|
||||
"trdate" timestamp(3) without time zone default NULL,
|
||||
"trstatus" varchar CHECK ("trstatus" IN ( 'clientApproved','clientCancelled','clientRejected','pending','serverApproved','serverCancelled' )) default NULL,
|
||||
"reid" int CHECK ("reid" >= 0) default NULL,
|
||||
"redate" timestamp without time zone default NULL,
|
||||
"redate" timestamp(3) without time zone default NULL,
|
||||
"acid" int CHECK ("acid" >= 0) default NULL,
|
||||
"acdate" timestamp without time zone default NULL,
|
||||
"transfer_exdate" timestamp without time zone default NULL,
|
||||
"acdate" timestamp(3) without time zone default NULL,
|
||||
"transfer_exdate" timestamp(3) without time zone default NULL,
|
||||
"idnlang" varchar(16) default NULL,
|
||||
"deltime" timestamp without time zone default NULL,
|
||||
"restime" timestamp without time zone default NULL,
|
||||
"deltime" timestamp(3) without time zone default NULL,
|
||||
"restime" timestamp(3) without time zone default NULL,
|
||||
"rgpstatus" varchar CHECK ("rgpstatus" IN ( 'addPeriod','autoRenewPeriod','renewPeriod','transferPeriod','pendingDelete','pendingRestore','redemptionPeriod' )) default NULL,
|
||||
"rgppostdata" text default NULL,
|
||||
"rgpdeltime" timestamp without time zone default NULL,
|
||||
"rgprestime" timestamp without time zone default NULL,
|
||||
"rgpdeltime" timestamp(3) without time zone default NULL,
|
||||
"rgprestime" timestamp(3) without time zone default NULL,
|
||||
"rgpresreason" text default NULL,
|
||||
"rgpstatement1" text default NULL,
|
||||
"rgpstatement2" text default NULL,
|
||||
|
@ -266,7 +266,7 @@ CREATE TABLE registry.domain (
|
|||
"autorenewperiod" smallint CHECK ("autorenewperiod" >= 0) default NULL,
|
||||
"renewperiod" smallint CHECK ("renewperiod" >= 0) default NULL,
|
||||
"transferperiod" smallint CHECK ("transferperiod" >= 0) default NULL,
|
||||
"reneweddate" timestamp without time zone default NULL,
|
||||
"reneweddate" timestamp(3) without time zone default NULL,
|
||||
primary key ("id"),
|
||||
unique ("name")
|
||||
);
|
||||
|
@ -320,10 +320,10 @@ CREATE TABLE registry.host (
|
|||
"domain_id" int CHECK ("domain_id" >= 0) default NULL,
|
||||
"clid" int CHECK ("clid" >= 0) NOT NULL,
|
||||
"crid" int CHECK ("crid" >= 0) NOT NULL,
|
||||
"crdate" timestamp without time zone NOT NULL,
|
||||
"crdate" timestamp(3) without time zone NOT NULL,
|
||||
"upid" int CHECK ("upid" >= 0) default NULL,
|
||||
"update" timestamp without time zone default NULL,
|
||||
"trdate" timestamp without time zone default NULL,
|
||||
"update" timestamp(3) without time zone default NULL,
|
||||
"trdate" timestamp(3) without time zone default NULL,
|
||||
primary key ("id"),
|
||||
unique ("name")
|
||||
);
|
||||
|
@ -357,19 +357,19 @@ CREATE TABLE registry.domain_auto_approve_transfer (
|
|||
"id" serial8,
|
||||
"name" varchar(68) NOT NULL,
|
||||
"registrant" int CHECK ("registrant" >= 0) default NULL,
|
||||
"crdate" timestamp without time zone NOT NULL,
|
||||
"exdate" timestamp without time zone NOT NULL,
|
||||
"update" timestamp without time zone default NULL,
|
||||
"crdate" timestamp(3) without time zone NOT NULL,
|
||||
"exdate" timestamp(3) without time zone NOT NULL,
|
||||
"update" timestamp(3) without time zone default NULL,
|
||||
"clid" int CHECK ("clid" >= 0) NOT NULL,
|
||||
"crid" int CHECK ("crid" >= 0) NOT NULL,
|
||||
"upid" int CHECK ("upid" >= 0) default NULL,
|
||||
"trdate" timestamp without time zone default NULL,
|
||||
"trdate" timestamp(3) without time zone default NULL,
|
||||
"trstatus" varchar CHECK ("trstatus" IN ( 'clientApproved','clientCancelled','clientRejected','pending','serverApproved','serverCancelled' )) default NULL,
|
||||
"reid" int CHECK ("reid" >= 0) default NULL,
|
||||
"redate" timestamp without time zone default NULL,
|
||||
"redate" timestamp(3) without time zone default NULL,
|
||||
"acid" int CHECK ("acid" >= 0) default NULL,
|
||||
"acdate" timestamp without time zone default NULL,
|
||||
"transfer_exdate" timestamp without time zone default NULL,
|
||||
"acdate" timestamp(3) without time zone default NULL,
|
||||
"transfer_exdate" timestamp(3) without time zone default NULL,
|
||||
primary key ("id")
|
||||
);
|
||||
|
||||
|
@ -385,15 +385,15 @@ CREATE TABLE registry.contact_auto_approve_transfer (
|
|||
"nin_type" varchar CHECK ("nin_type" IN ( 'personal','business' )) default NULL,
|
||||
"clid" int CHECK ("clid" >= 0) NOT NULL,
|
||||
"crid" int CHECK ("crid" >= 0) NOT NULL,
|
||||
"crdate" timestamp without time zone NOT NULL,
|
||||
"crdate" timestamp(3) without time zone NOT NULL,
|
||||
"upid" int CHECK ("upid" >= 0) default NULL,
|
||||
"update" timestamp without time zone default NULL,
|
||||
"trdate" timestamp without time zone default NULL,
|
||||
"update" timestamp(3) without time zone default NULL,
|
||||
"trdate" timestamp(3) without time zone default NULL,
|
||||
"trstatus" varchar CHECK ("trstatus" IN ( 'clientApproved','clientCancelled','clientRejected','pending','serverApproved','serverCancelled' )) default NULL,
|
||||
"reid" int CHECK ("reid" >= 0) default NULL,
|
||||
"redate" timestamp without time zone default NULL,
|
||||
"redate" timestamp(3) without time zone default NULL,
|
||||
"acid" int CHECK ("acid" >= 0) default NULL,
|
||||
"acdate" timestamp without time zone default NULL,
|
||||
"acdate" timestamp(3) without time zone default NULL,
|
||||
"disclose_voice" varchar CHECK ("disclose_voice" IN ( '0','1' )) NOT NULL default '1',
|
||||
"disclose_fax" varchar CHECK ("disclose_fax" IN ( '0','1' )) NOT NULL default '1',
|
||||
"disclose_email" varchar CHECK ("disclose_email" IN ( '0','1' )) NOT NULL default '1',
|
||||
|
@ -563,8 +563,8 @@ CREATE TABLE registry.support_tickets (
|
|||
evidence TEXT DEFAULT NULL,
|
||||
relevant_urls TEXT DEFAULT NULL,
|
||||
date_of_incident DATE DEFAULT NULL,
|
||||
date_created TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||
last_updated TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||
date_created TIMESTAMP(3) WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||
last_updated TIMESTAMP(3) WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (user_id) REFERENCES registry.users(id),
|
||||
FOREIGN KEY (category_id) REFERENCES registry.ticket_categories(id)
|
||||
);
|
||||
|
@ -574,7 +574,7 @@ CREATE TABLE ticket_responses (
|
|||
ticket_id INTEGER NOT NULL,
|
||||
responder_id INTEGER NOT NULL,
|
||||
response TEXT NOT NULL,
|
||||
date_created TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||
date_created TIMESTAMP(3) WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (ticket_id) REFERENCES support_tickets(id)
|
||||
);
|
||||
|
||||
|
@ -664,7 +664,7 @@ CREATE TABLE registryTransaction.transaction_identifier (
|
|||
registrar_id INT NOT NULL,
|
||||
clTRID VARCHAR(64),
|
||||
clTRIDframe TEXT,
|
||||
cldate TIMESTAMP WITHOUT TIME ZONE,
|
||||
cldate TIMESTAMP(3) WITHOUT TIME ZONE,
|
||||
clmicrosecond INT,
|
||||
cmd VARCHAR(10) CHECK (cmd IN ('login','logout','check','info','poll','transfer','create','delete','renew','update')),
|
||||
obj_type VARCHAR(10) CHECK (obj_type IN ('domain','host','contact')),
|
||||
|
@ -673,7 +673,7 @@ CREATE TABLE registryTransaction.transaction_identifier (
|
|||
msg VARCHAR(255),
|
||||
svTRID VARCHAR(64),
|
||||
svTRIDframe TEXT,
|
||||
svdate TIMESTAMP WITHOUT TIME ZONE,
|
||||
svdate TIMESTAMP(3) WITHOUT TIME ZONE,
|
||||
svmicrosecond INT,
|
||||
CONSTRAINT unique_clTRID UNIQUE (clTRID),
|
||||
CONSTRAINT unique_svTRID UNIQUE (svTRID),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue