Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
domainepublic
alternc
Commits
83273520
Commit
83273520
authored
Mar 26, 2014
by
Alan Garcia
Browse files
Tentative pour #1576
parent
2793eb73
Changes
1
Hide whitespace changes
Inline
Side-by-side
install/mysql.sql
View file @
83273520
...
...
@@ -79,7 +79,7 @@ CREATE TABLE IF NOT EXISTS chgmail (
cookie
varchar
(
20
)
NOT
NULL
default
''
,
-- Cookie du mail
ckey
varchar
(
6
)
NOT
NULL
default
''
,
-- Clé de vérif
mail
varchar
(
128
)
NOT
NULL
default
''
,
-- Nouvel Email
ts
int
(
1
0
)
unsigned
NOT
NULL
default
'0'
,
-- Timestamp de la demande
ts
big
int
(
2
0
)
unsigned
NOT
NULL
default
'0'
,
-- Timestamp de la demande
PRIMARY
KEY
(
uid
)
)
ENGINE
=
MyISAM
COMMENT
=
'Demandes de changements de mail en cours'
;
...
...
@@ -89,7 +89,7 @@ CREATE TABLE IF NOT EXISTS chgmail (
-- Contient les bases mysql des membres, + login / pass en clair
CREATE
TABLE
IF
NOT
EXISTS
db
(
id
int
(
1
0
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
id
big
int
(
2
0
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
uid
int
(
10
)
unsigned
NOT
NULL
default
'0'
,
-- Numéro de l`utilisateur
login
varchar
(
16
)
NOT
NULL
default
''
,
-- Nom d`utilisateur mysql
pass
varchar
(
16
)
NOT
NULL
default
''
,
-- Mot de passe mysql
...
...
@@ -107,7 +107,7 @@ CREATE TABLE IF NOT EXISTS db (
-- Liste des domaines hébergés
CREATE
TABLE
IF
NOT
EXISTS
domaines
(
id
int
(
1
0
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
id
big
int
(
2
0
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
compte
int
(
10
)
unsigned
NOT
NULL
default
'0'
,
domaine
varchar
(
64
)
NOT
NULL
default
''
,
gesdns
int
(
1
)
NOT
NULL
default
'1'
,
...
...
@@ -163,7 +163,7 @@ CREATE TABLE IF NOT EXISTS membres (
enabled
tinyint
(
4
)
NOT
NULL
default
'1'
,
-- Le compte est-il actif ?
su
tinyint
(
4
)
NOT
NULL
default
'0'
,
-- Le compte est-il super-admin ?
mail
varchar
(
128
)
NOT
NULL
default
''
,
-- Adresse email du possesseur
lastaskpass
int
(
1
0
)
unsigned
default
'0'
,
-- Date de dernière demande du pass par mail
lastaskpass
big
int
(
2
0
)
unsigned
default
'0'
,
-- Date de dernière demande du pass par mail
show_help
tinyint
(
4
)
NOT
NULL
default
'1'
,
-- Faut-il afficher l`aide dans le bureau
lastlogin
datetime
NOT
NULL
default
'0000-00-00 00:00:00'
,
-- Date du dernier login
lastfail
tinyint
(
4
)
NOT
NULL
default
'0'
,
-- Nombre d`échecs depuis le dernier login
...
...
@@ -191,7 +191,7 @@ CREATE TABLE IF NOT EXISTS membres (
CREATE
TABLE
IF
NOT
EXISTS
quotas
(
uid
int
(
10
)
unsigned
NOT
NULL
default
'0'
,
-- Numéro GID du membre concerné
name
varchar
(
64
)
NOT
NULL
default
''
,
-- Nom du quota
total
int
(
1
0
)
unsigned
NOT
NULL
default
'0'
,
-- Quota total (maximum autorisé)
total
big
int
(
2
0
)
unsigned
NOT
NULL
default
'0'
,
-- Quota total (maximum autorisé)
PRIMARY
KEY
(
uid
,
name
)
)
ENGINE
=
MyISAM
COMMENT
=
'Quotas des Membres'
;
...
...
@@ -213,7 +213,7 @@ CREATE TABLE IF NOT EXISTS sessions (
-- Sous-domaines des membres
CREATE
TABLE
IF
NOT
EXISTS
sub_domaines
(
id
int
(
1
0
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
id
big
int
(
2
0
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
compte
int
(
10
)
unsigned
NOT
NULL
default
'0'
,
domaine
varchar
(
255
)
NOT
NULL
default
''
,
sub
varchar
(
100
)
NOT
NULL
default
''
,
...
...
@@ -222,7 +222,8 @@ CREATE TABLE IF NOT EXISTS sub_domaines (
web_action
enum
(
'OK'
,
'UPDATE'
,
'DELETE'
)
NOT
NULL
default
'UPDATE'
,
web_result
varchar
(
255
)
not
null
default
''
,
enable
enum
(
'ENABLED'
,
'ENABLE'
,
'DISABLED'
,
'DISABLE'
)
NOT
NULL
DEFAULT
'ENABLED'
,
PRIMARY
KEY
(
id
)
PRIMARY
KEY
(
id
),
UNIQUE
(
compte
,
domaine
,
sub
,
type
,
valeur
)
-- ,FOREIGN KEY (type) REFERENCES (domaines_type)
)
ENGINE
=
MyISAM
;
...
...
@@ -232,8 +233,8 @@ CREATE TABLE IF NOT EXISTS sub_domaines (
-- Addresses for domain.
CREATE
TABLE
IF
NOT
EXISTS
`address`
(
`id`
int
(
1
0
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
-- Technical id.
`domain_id`
int
(
1
0
)
unsigned
NOT
NULL
REFERENCES
`domaines`
(
`id`
),
-- FK to domaines.
`id`
big
int
(
2
0
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
-- Technical id.
`domain_id`
big
int
(
2
0
)
unsigned
NOT
NULL
REFERENCES
`domaines`
(
`id`
),
-- FK to domaines.
`address`
varchar
(
255
)
NOT
NULL
,
-- The address.
`type`
char
(
8
)
NOT
NULL
,
-- standard emails are '', other may be 'mailman' or 'sympa' ...
`password`
varchar
(
255
)
DEFAULT
NULL
,
-- The password associated to the address.
...
...
@@ -251,13 +252,13 @@ CREATE TABLE IF NOT EXISTS `address` (
-- Local delivered mailboxes.
CREATE
TABLE
IF
NOT
EXISTS
`mailbox`
(
`id`
int
(
1
0
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
-- Technical id.
`address_id`
int
(
1
0
)
unsigned
NOT
NULL
REFERENCES
`address`
(
`id`
),
-- Reference to address.
`id`
big
int
(
2
0
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
-- Technical id.
`address_id`
big
int
(
2
0
)
unsigned
NOT
NULL
REFERENCES
`address`
(
`id`
),
-- Reference to address.
`path`
varchar
(
255
)
NOT
NULL
,
-- Relative path to the mailbox.
`quota`
int
(
1
0
)
unsigned
DEFAULT
NULL
,
-- Quota for this mailbox.
`quota`
big
int
(
2
0
)
unsigned
DEFAULT
NULL
,
-- Quota for this mailbox.
`delivery`
varchar
(
255
)
NOT
NULL
,
-- Delivery transport.
`update_date`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
,
-- Update date, for technical usage only.
`bytes`
int
(
1
0
)
NOT
NULL
DEFAULT
'0'
,
-- number of bytes in the mailbox, filled by dovecot
`bytes`
big
int
(
2
0
)
NOT
NULL
DEFAULT
'0'
,
-- number of bytes in the mailbox, filled by dovecot
`messages`
int
(
11
)
NOT
NULL
DEFAULT
'0'
,
-- number of messages in the mailbox, filled by dovecot
`lastlogin`
datetime
NOT
NULL
,
-- Last login, filled by dovecot
`mail_action`
enum
(
'OK'
,
'DELETE'
,
'DELETING'
)
NOT
NULL
default
'OK'
,
-- mail_action is DELETE or DELETING when deleting a mailbox by cron
...
...
@@ -271,8 +272,8 @@ CREATE TABLE IF NOT EXISTS `mailbox` (
-- Other recipients for an address (aliases)
CREATE
TABLE
IF
NOT
EXISTS
`recipient`
(
`id`
int
(
1
0
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
-- Technical id.
`address_id`
int
(
1
0
)
unsigned
NOT
NULL
REFERENCES
`address`
(
`id`
),
-- Reference to address
`id`
big
int
(
2
0
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
-- Technical id.
`address_id`
big
int
(
2
0
)
unsigned
NOT
NULL
REFERENCES
`address`
(
`id`
),
-- Reference to address
`recipients`
text
NOT
NULL
,
-- Recipients
`update_date`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
,
-- Update date, for technical usage only.
PRIMARY
KEY
(
`id`
),
...
...
@@ -287,7 +288,7 @@ CREATE TABLE IF NOT EXISTS `recipient` (
CREATE
TABLE
IF
NOT
EXISTS
defquotas
(
quota
varchar
(
128
),
-- Nom du quota
value
int
(
1
0
)
unsigned
default
'0'
,
-- Valeur du quota
value
big
int
(
2
0
)
unsigned
default
'0'
,
-- Valeur du quota
type
varchar
(
128
)
default
'default'
,
-- Type de compte associée à ce quota
PRIMARY
KEY
(
quota
,
type
)
)
ENGINE
=
MyISAM
;
...
...
@@ -386,12 +387,12 @@ INSERT IGNORE INTO tld VALUES ('asia', 1);
-- if comment is null, then the variable is internal and will not show
-- up in the generic configuration panel
CREATE
TABLE
`variable`
(
`id`
int
(
1
0
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
`id`
big
int
(
2
0
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
`name`
varchar
(
48
)
NOT
NULL
DEFAULT
''
,
`value`
longtext
NOT
NULL
,
`comment`
mediumtext
,
`strata`
enum
(
'DEFAULT'
,
'GLOBAL'
,
'FQDN'
,
'FQDN_CREATOR'
,
'CREATOR'
,
'MEMBER'
,
'DOMAIN'
)
NOT
NULL
DEFAULT
'DEFAULT'
,
`strata_id`
int
(
1
0
)
DEFAULT
NULL
,
`strata_id`
big
int
(
2
0
)
DEFAULT
NULL
,
`type`
text
,
PRIMARY
KEY
(
`id`
),
UNIQUE
KEY
`name_2`
(
`name`
,
`strata`
,
`strata_id`
),
...
...
@@ -480,7 +481,7 @@ VALUES (
-- Domains type
CREATE
TABLE
IF
NOT
EXISTS
`domaines_type`
(
`name`
VARCHAR
(
255
)
NOT
NULL
,
-- Uniq name
`name`
VARCHAR
(
30
)
NOT
NULL
,
-- Uniq name
`description`
TEXT
,
-- Human description
`target`
enum
(
'NONE'
,
'URL'
,
'DIRECTORY'
,
'IP'
,
'IPV6'
,
'DOMAIN'
,
'TXT'
)
NOT
NULL
DEFAULT
'NONE'
,
-- Target type
`entry`
VARCHAR
(
255
)
DEFAULT
''
,
-- BIND entry
...
...
@@ -709,13 +710,14 @@ CREATE TABLE IF NOT EXISTS `piwik_sites` (
-- Defaults subdomains to create when a domain is added
CREATE
TABLE
IF
NOT
EXISTS
`default_subdomains`
(
`id`
int
(
1
0
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
`id`
big
int
(
2
0
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
`sub`
varchar
(
255
)
NOT
NULL
,
`domain_type`
varchar
(
255
)
NOT
NULL
,
`domain_type`
varchar
(
30
)
NOT
NULL
,
`domain_type_parameter`
varchar
(
255
)
NOT
NULL
,
`concerned`
enum
(
'BOTH'
,
'MAIN'
,
'SLAVE'
)
NOT
NULL
DEFAULT
'MAIN'
,
`enabled`
boolean
not
null
default
true
,
PRIMARY
KEY
(
`id`
)
PRIMARY
KEY
(
`id`
),
UNIQUE
KEY
`unique_row`
(
`sub`
,
`domain_type`
,
`domain_type_parameter`
,
`concerned`
)
)
ENGINE
=
MyISAM
COMMENT
=
'Contains the defaults subdomains created on domains creation'
;
INSERT
IGNORE
INTO
`default_subdomains`
(
`sub`
,
`domain_type`
,
`domain_type_parameter`
,
`concerned`
)
VALUES
...
...
@@ -753,7 +755,7 @@ CREATE TABLE IF NOT EXISTS `vm_history` (
CREATE
TABLE
IF
NOT
EXISTS
`actions`
(
id
int
(
1
0
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
id
big
int
(
2
0
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
type
enum
(
'CREATE_FILE'
,
'FIX_USER'
,
'CREATE_DIR'
,
'DELETE'
,
'MOVE'
,
'FIX_DIR'
,
'FIX_FILE'
),
parameters
longtext
default
NULL
,
creation
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment