fix: save id as blob, not as string
add: some progress to new discovery add: some tests remove: migrations. restarting for now
This commit is contained in:
		
							parent
							
								
									b4eec336a2
								
							
						
					
					
						commit
						51ab1d7982
					
				
					 22 changed files with 345 additions and 121 deletions
				
			
		| 
						 | 
				
			
			@ -25,7 +25,8 @@ create table relays
 | 
			
		|||
    controller_id      VARCHAR(33) not null
 | 
			
		||||
        references controllers (id),
 | 
			
		||||
    active_schedule_id VARCHAR(33)
 | 
			
		||||
        references schedules
 | 
			
		||||
        references schedules,
 | 
			
		||||
    tag                vARCHAR(64)
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
create table schedules
 | 
			
		||||
| 
						 | 
				
			
			@ -34,7 +35,9 @@ create table schedules
 | 
			
		|||
        primary key
 | 
			
		||||
        unique,
 | 
			
		||||
    name    VARCHAR(128),
 | 
			
		||||
    periods BLOB
 | 
			
		||||
    periods BLOB,
 | 
			
		||||
    tag     vARCHAR(64)
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
INSERT INTO schedules (id, name, periods) VALUES ('off', 'off', x'00');
 | 
			
		||||
INSERT INTO schedules (id, name, periods) VALUES (x'6f666600000000000000000000000000', 'off', x'00');
 | 
			
		||||
INSERT INTO schedules (id, name, periods) VALUES (x'6f6e0000000000000000000000000000',  'on',  x'010000009F05');
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,8 +0,0 @@
 | 
			
		|||
alter table relays
 | 
			
		||||
    add tag varchar(64);
 | 
			
		||||
 | 
			
		||||
alter table controllers
 | 
			
		||||
    add tag varchar(64);
 | 
			
		||||
 | 
			
		||||
INSERT INTO schedules (id, name, periods) VALUES ('on', 'on', x'010000009F05');
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue