forked from Outils-PeerTube/listener-rss-aggregator
		
	sepcify not null sqlite to prevent some issues
This commit is contained in:
		@@ -15,9 +15,9 @@ export class SqliteTools {
 | 
			
		||||
    let req = sql`CREATE TABLE IF NOT EXISTS listeners
 | 
			
		||||
                  (
 | 
			
		||||
                    address TEXT NOT NULL UNIQUE,
 | 
			
		||||
                    customfields TEXT DEFAULT '[]',
 | 
			
		||||
                    timeloop INTEGER DEFAULT 300,
 | 
			
		||||
                    last_entries_links TEXT DEFAULT '[]',
 | 
			
		||||
                    customfields TEXT DEFAULT '[]' NOT NULL,
 | 
			
		||||
                    timeloop INTEGER DEFAULT 300 NOT NULL,
 | 
			
		||||
                    last_entries_links TEXT DEFAULT '[]' NOT NULL,
 | 
			
		||||
                    PRIMARY KEY (address),
 | 
			
		||||
                    CHECK(timeloop >= 0)
 | 
			
		||||
                  );`;
 | 
			
		||||
@@ -47,8 +47,8 @@ export class SqliteTools {
 | 
			
		||||
    let req = sql`INSERT INTO listeners (address, timeloop, customfields, last_entries_links)
 | 
			
		||||
                  VALUES (${listener.address},
 | 
			
		||||
                    ${listener.timeloop},
 | 
			
		||||
                    ${JSON.stringify(listener.customfields)},
 | 
			
		||||
                    ${JSON.stringify(listener.lastEntriesLinks)})`;
 | 
			
		||||
                    ${JSON.stringify(listener.customfields ? listener.customfields : [])},
 | 
			
		||||
                    ${JSON.stringify(listener.lastEntriesLinks ? listener.lastEntriesLinks : [])})`;
 | 
			
		||||
    await db.query(req);
 | 
			
		||||
    await db.dispose();
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user