PostgreSQL support
parent
61e9aed4be
commit
7ec3f80305
|
@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS `defense` (
|
|||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`epoch` int(11) NOT NULL,
|
||||
`type` tinyint(4) NOT NULL,
|
||||
`ipaddr` varchar(40) NOT NULL,
|
||||
`ipaddr` varchar(256) NOT NULL,
|
||||
`data` text NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=30 ;
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
CREATE SEQUENCE defense_seq;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS defense (
|
||||
id int NOT NULL DEFAULT NEXTVAL ('defense_seq'),
|
||||
epoch int NOT NULL,
|
||||
type smallint NOT NULL,
|
||||
ipaddr varchar(256) NOT NULL,
|
||||
data text NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
) ;
|
||||
|
||||
ALTER SEQUENCE defense_seq RESTART WITH 30;
|
Loading…
Reference in New Issue