From 8629e09d9b60eda1c4f06d88267287083f8f3ea2 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 20 Dec 2005 07:23:33 +0100 Subject: [PATCH] schema: add email column to ttrss_users --- schema/ttrss_schema_mysql.sql | 1 + schema/ttrss_schema_pgsql.sql | 1 + schema/upgrade-1.1-1.1.1-mysql.sql | 7 +++++++ schema/upgrade-1.1-1.1.1-pgsql.sql | 7 +++++++ 4 files changed, 16 insertions(+) diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index 438d46054..3d3187d72 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 dcb996593..5ddcfe1d7 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 cf8d7d947..994cc76de 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 110d01af0..06380815c 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;