Initial commit
This commit is contained in:
		
							
								
								
									
										1
									
								
								db/migrations/1_create_users_table.down.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								db/migrations/1_create_users_table.down.sql
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
DROP TABLE IF EXISTS users;
 | 
			
		||||
							
								
								
									
										5
									
								
								db/migrations/1_create_users_table.up.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								db/migrations/1_create_users_table.up.sql
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
CREATE TABLE IF NOT EXISTS users (
 | 
			
		||||
    id INTEGER PRIMARY KEY AUTOINCREMENT,
 | 
			
		||||
    username TEXT NOT NULL UNIQUE,
 | 
			
		||||
    password TEXT NOT NULL
 | 
			
		||||
);
 | 
			
		||||
							
								
								
									
										1
									
								
								db/migrations/2_create_hostnames_table.down.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								db/migrations/2_create_hostnames_table.down.sql
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
DROP TABLE IF EXISTS hostnames;
 | 
			
		||||
							
								
								
									
										7
									
								
								db/migrations/2_create_hostnames_table.up2.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								db/migrations/2_create_hostnames_table.up2.sql
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
CREATE TABLE hostnames (
 | 
			
		||||
    id INTEGER PRIMARY KEY AUTOINCREMENT,
 | 
			
		||||
    category TEXT NOT NULL,
 | 
			
		||||
    hostname TEXT NOT NULL,
 | 
			
		||||
    parameters JSON,  
 | 
			
		||||
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
 | 
			
		||||
);
 | 
			
		||||
							
								
								
									
										2
									
								
								db/migrations/3_alter_hostnames_add_deleted.down.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								db/migrations/3_alter_hostnames_add_deleted.down.sql
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
ALTER TABLE hostnames
 | 
			
		||||
DROP COLUMN deleted;
 | 
			
		||||
							
								
								
									
										2
									
								
								db/migrations/3_alter_hostnames_add_deleted.up.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								db/migrations/3_alter_hostnames_add_deleted.up.sql
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
ALTER TABLE hostnames
 | 
			
		||||
ADD COLUMN deleted BOOLEAN DEFAULT FALSE;
 | 
			
		||||
		Reference in New Issue
	
	Block a user