summaryrefslogtreecommitdiffstats
path: root/database/postgresql/sql-schema.sql
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2012-01-08 22:52:36 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2013-06-13 01:01:55 +0200
commitd5a844f9067d6a119ab1be05ae938afda292825b (patch)
treee2a384db034d068a2cd10dcd5c715d5530bbed63 /database/postgresql/sql-schema.sql
parentf3c6505df85d22706e8a8a849ead71bb10246cbe (diff)
downloadeurephia-d5a844f9067d6a119ab1be05ae938afda292825b.tar.gz
eurephia-d5a844f9067d6a119ab1be05ae938afda292825b.tar.xz
eurephia-d5a844f9067d6a119ab1be05ae938afda292825b.zip
edb-pgsql: Correct some wrong table names and references
None of the tables used by the edb-pgsql driver uses the 'openvpn_' prefix Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to 'database/postgresql/sql-schema.sql')
-rw-r--r--database/postgresql/sql-schema.sql34
1 files changed, 17 insertions, 17 deletions
diff --git a/database/postgresql/sql-schema.sql b/database/postgresql/sql-schema.sql
index 11b5c7d..f66f067 100644
--- a/database/postgresql/sql-schema.sql
+++ b/database/postgresql/sql-schema.sql
@@ -41,7 +41,7 @@ CREATE TABLE users (
last_accessed timestamp ,
uid SERIAL PRIMARY KEY
);
-CREATE UNIQUE INDEX openvpn_users_uname ON openvpn_users(username);
+CREATE UNIQUE INDEX users_uname ON users(username);
-- View users_last_access: A view which allows the eurephia-auth user to update
-- the last_access column in users table
@@ -57,14 +57,14 @@ CREATE RULE users_last_access_touch
-- Table usercerts: keeps the links of user accounts and certificates and
-- which firewall access profile each access is granted
CREATE TABLE usercerts (
- uid integer NOT NULL, -- Must be found in openvpn_users
- certid integer NOT NULL, -- Must be found in openvpn_certificates
- accessprofile integer , -- If not null, it must be found in openvpn_accesses
+ uid integer NOT NULL, -- Must be found in 'users'
+ certid integer NOT NULL, -- Must be found in 'certificates'
+ accessprofile integer , -- If not null, it must be found in 'accesses'
registered timestamp DEFAULT CURRENT_TIMESTAMP,
uicid SERIAL PRIMARY KEY -- Unique ID
);
-CREATE INDEX openvpn_usercerts_uid ON openvpn_usercerts(uid);
-CREATE INDEX openvpn_usercerts_certid ON openvpn_usercerts(certid);
+CREATE INDEX usercerts_uid ON usercerts(uid);
+CREATE INDEX usercerts_certid ON usercerts(certid);
-- Table accesses: all available firewall profiles must be registered here.
CREATE TABLE accesses (
@@ -133,12 +133,12 @@ CREATE UNIQUE INDEX blacklist_digest ON blacklist(digest);
CREATE UNIQUE INDEX blacklist_username ON blacklist(username);
CREATE UNIQUE INDEX blacklist_remoteip ON blacklist(remoteip);
--- Table openvpn_attempts: Keeps an overview for eurephia on which certificates, usernames and
--- IP addresses which have had unsuccessful login attempts. This is
--- used by the auto-blacklist feature in eurephia. Of the attempts
--- value reaches the configured blacklist threshold, it will be
--- blacklisted. Only one of the digest, username and IP address fields
--- should be used per record.
+-- Table attempts: Keeps an overview for eurephia on which certificates, usernames and
+-- IP addresses which have had unsuccessful login attempts. This is
+-- used by the auto-blacklist feature in eurephia. Of the attempts
+-- value reaches the configured blacklist threshold, it will be
+-- blacklisted. Only one of the digest, username and IP address fields
+-- should be used per record.
CREATE TABLE attempts (
username varchar(32) ,
digest varchar(64) ,
@@ -152,10 +152,10 @@ CREATE UNIQUE INDEX attempts_username ON attempts(username);
CREATE UNIQUE INDEX attempts_digest ON attempts(digest);
CREATE UNIQUE INDEX attempts_remoteip ON attempts(remoteip);
--- Table openvpn_sessionkeys: A sessionseed is a key which is only unique in a short time
--- perspective, while a sessionkey is supposed to be unique for
--- ever. This table is a "translation" table between current
--- session seeds and session keys.
+-- Table sessionkeys: A sessionseed is a key which is only unique in a short time
+-- perspective, while a sessionkey is supposed to be unique for
+-- ever. This table is a "translation" table between current
+-- session seeds and session keys.
CREATE TABLE sessionkeys (
sessionseed varchar(128) NOT NULL,
sessionkey varchar(128) NOT NULL,
@@ -191,7 +191,7 @@ CREATE INDEX eurephia_adminlog_sesskey ON eurephia_adminlog(sessionkey);
-- Table eurephia_adminaccesss: Defines which modules eurephia users have access to.
-- The access is defined per user account. uid refers
--- to the user account in the openvpn_users table.
+-- to the user account in the users table.
CREATE TABLE eurephia_adminaccess (
uid integer NOT NULL,
interface char NOT NULL, -- C-onsole, W-eb