Browse Source

schema: when inserting initial forum feed, don't hardcode admin UID as 1

Andrew Dolgov 9 months ago
parent
commit
60609637bc
2 changed files with 2 additions and 2 deletions
  1. 1 1
      schema/ttrss_schema_mysql.sql
  2. 1 1
      schema/ttrss_schema_pgsql.sql

+ 1 - 1
schema/ttrss_schema_mysql.sql

@@ -146,7 +146,7 @@ create table ttrss_feeds (id integer not null auto_increment primary key,
 	unique(feed_url(255), owner_uid)) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
 
 insert into ttrss_feeds (owner_uid, title, feed_url) values
-	(1, 'Tiny Tiny RSS: Forum', 'http://tt-rss.org/forum/rss.php');
+	((select id from ttrss_users where login = 'admin'), 'Tiny Tiny RSS: Forum', 'https://tt-rss.org/forum/rss.php');
 
 create table ttrss_entries (id integer not null primary key auto_increment,
 	title text not null,

+ 1 - 1
schema/ttrss_schema_pgsql.sql

@@ -115,7 +115,7 @@ create index ttrss_feeds_owner_uid_index on ttrss_feeds(owner_uid);
 create index ttrss_feeds_cat_id_idx on ttrss_feeds(cat_id);
 
 insert into ttrss_feeds (owner_uid, title, feed_url) values
-	(1, 'Tiny Tiny RSS: Forum', 'http://tt-rss.org/forum/rss.php');
+	((select id from ttrss_users where login = 'admin'), 'Tiny Tiny RSS: Forum', 'https://tt-rss.org/forum/rss.php');
 
 create table ttrss_archived_feeds (id integer not null primary key,
 	owner_uid integer not null references ttrss_users(id) on delete cascade,