forked from dennylin93/rcguard
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from Mindless999/patch-1
Update Postgresql
- Loading branch information
Showing
1 changed file
with
8 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
-- PostgreSQL table for rcguard | ||
-- edit table and indexes so the prefix is added to it if you have done so in Roundcube | ||
|
||
CREATE TABLE rcguard ( | ||
ip varchar(40) NOT NULL PRIMARY KEY, | ||
first timestamp with time zone NOT NULL, | ||
last timestamp with time zone NOT NULL, | ||
hits integer NOT NULL | ||
ip character varying(40) NOT NULL, | ||
first timestamp with time zone NOT NULL, | ||
last timestamp with time zone NOT NULL, | ||
hits integer NOT NULL | ||
); | ||
|
||
ALTER TABLE ONLY rcguard | ||
ADD CONSTRAINT rcguard_pkey PRIMARY KEY (ip); | ||
|
||
CREATE INDEX rcguard_last_idx ON rcguard(last); | ||
CREATE INDEX rcguard_hits_idx ON rcguard(hits); |