diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index 438d4605..3d3187d7 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -28,6 +28,7 @@ create table ttrss_users (id integer primary key not null auto_increment, last_login datetime default null, access_level integer not null default 0, theme_id integer default null, + email varchar(250) not null default '', index (theme_id), foreign key (theme_id) references ttrss_themes(id)) TYPE=InnoDB; diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index dcb99659..5ddcfe1d 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -27,6 +27,7 @@ create table ttrss_users (id serial not null primary key, pwd_hash varchar(250) not null, last_login timestamp default null, access_level integer not null default 0, + email varchar(250) not null default '', theme_id integer references ttrss_themes(id) default null); insert into ttrss_users (login,pwd_hash,access_level) values ('admin', 'password', 10); diff --git a/schema/upgrade-1.1-1.1.1-mysql.sql b/schema/upgrade-1.1-1.1.1-mysql.sql index cf8d7d94..994cc76d 100644 --- a/schema/upgrade-1.1-1.1.1-mysql.sql +++ b/schema/upgrade-1.1-1.1.1-mysql.sql @@ -29,4 +29,11 @@ alter table ttrss_feeds alter column auth_login set default ''; alter table ttrss_feeds change auth_pass auth_pass varchar(250) not null; alter table ttrss_feeds alter column auth_pass set default ''; +alter table ttrss_users add column email varchar(250); + +update ttrss_users set email = ''; + +alter table ttrss_users change email email varchar(250) not null; +alter table ttrss_users alter column email set default ''; + commit; diff --git a/schema/upgrade-1.1-1.1.1-pgsql.sql b/schema/upgrade-1.1-1.1.1-pgsql.sql index 110d01af..06380815 100644 --- a/schema/upgrade-1.1-1.1.1-pgsql.sql +++ b/schema/upgrade-1.1-1.1.1-pgsql.sql @@ -29,4 +29,11 @@ alter table ttrss_feeds alter column auth_login set default ''; alter table ttrss_feeds alter column auth_pass set not null; alter table ttrss_feeds alter column auth_pass set default ''; +alter table ttrss_users add column email varchar(250); + +update ttrss_users set email = ''; + +alter table ttrss_users alter column email set not null; +alter table ttrss_users alter column email set default ''; + commit;