mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	
							parent
							
								
									ca307b2bab
								
							
						
					
					
						commit
						28f821cb34
					
				
							
								
								
									
										15
									
								
								src/migrations/20241031102325-user-unsubscription.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/migrations/20241031102325-user-unsubscription.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,15 @@
 | 
			
		||||
exports.up = function(db, cb) {
 | 
			
		||||
    db.runSql(`
 | 
			
		||||
    CREATE TABLE IF NOT EXISTS user_unsubscription
 | 
			
		||||
    (
 | 
			
		||||
        user_id INTEGER NOT NULL references users (id),
 | 
			
		||||
        subscription VARCHAR(255) NOT NULL,
 | 
			
		||||
        created_at TIMESTAMP DEFAULT now(),
 | 
			
		||||
        PRIMARY KEY (user_id, subscription)
 | 
			
		||||
    );
 | 
			
		||||
`, cb);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
exports.down = function(db, cb) {
 | 
			
		||||
    db.runSql(`DROP TABLE IF EXISTS user_unsubscription;`, cb);
 | 
			
		||||
};
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user