Commit 1d9a11c1 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Improved DB

parent 84762195
Pipeline #6703 passed with stages
in 31 seconds
......@@ -8,7 +8,7 @@
#%define _datadir %{_datarootdir}
#%define _docdir %{_datadir}/doc
%define build_number 4
%define build_number 5
#%if %{build_number}
#%define build_number_ext -%{build_number}
#%endif
......
......@@ -82,7 +82,7 @@ class Account {
id INTEGER(11) UNSIGNED NOT NULL AUTO_INCREMENT,
username VARCHAR(64) NOT NULL,
domain VARCHAR(64) NOT NULL,
email VARCHAR(64),
email VARCHAR(64) DEFAULT NULL,
activated VARCHAR(1) NOT NULL DEFAULT '0',
confirmation_key VARCHAR(14) DEFAULT NULL,
ip_address VARCHAR(39) NOT NULL,
......
......@@ -65,8 +65,8 @@ class Password {
$query = "CREATE TABLE IF NOT EXISTS " . ACCOUNTS_ALGO_DB_TABLE . " (
id INTEGER(11) UNSIGNED NOT NULL AUTO_INCREMENT,
account_id INTEGER(11) UNSIGNED NOT NULL,
password VARCHAR(255),
algorithm VARCHAR(10),
password VARCHAR(255) NOT NULL,
algorithm VARCHAR(10) NOT NULL DEFAULT 'MD5',
PRIMARY KEY (id), UNIQUE KEY account (account_id, algorithm))";
$this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment