Genera: datastore.
This commit is contained in:
		
							parent
							
								
									9155ee88f1
								
							
						
					
					
						commit
						533adbdd09
					
				
					 5 changed files with 158 additions and 3 deletions
				
			
		
							
								
								
									
										5
									
								
								datastore/migrations/00002_AddGenera_down.sql
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								datastore/migrations/00002_AddGenera_down.sql
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | |||
| -- bactdb | ||||
| -- Matthew R Dillon | ||||
| 
 | ||||
| DROP TABLE genera; | ||||
| 
 | ||||
							
								
								
									
										19
									
								
								datastore/migrations/00002_AddGenera_up.sql
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								datastore/migrations/00002_AddGenera_up.sql
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,19 @@ | |||
| -- bactdb | ||||
| -- Matthew R Dillon | ||||
| 
 | ||||
| CREATE TABLE genera ( | ||||
|     id BIGSERIAL NOT NULL, | ||||
|     genusname CHARACTER VARYING(100), | ||||
| 
 | ||||
|     created_at TIMESTAMP WITH TIME ZONE, | ||||
|     updated_at TIMESTAMP WITH TIME ZONE, | ||||
|     deleted_at TIMESTAMP WITH TIME ZONE, | ||||
| 
 | ||||
|     CONSTRAINT genus_pkey PRIMARY KEY (id) | ||||
| ); | ||||
| 
 | ||||
| CREATE UNIQUE INDEX genusname_idx | ||||
|     ON genera | ||||
|     USING btree | ||||
|     (genusname COLLATE pg_catalog."default"); | ||||
| 
 | ||||
		Reference in a new issue
	
	 Matthew Dillon
						Matthew Dillon