mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-26 08:12:33 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			40 lines
		
	
	
		
			823 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			823 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { Column, DatabaseSchema, Table } from 'src/sql-tools';
 | |
| 
 | |
| @Table()
 | |
| export class Table1 {
 | |
|   @Column({ name: 'column-1' })
 | |
|   column1!: string;
 | |
| }
 | |
| 
 | |
| export const description = 'should register a table with a column with a specific name';
 | |
| export const schema: DatabaseSchema = {
 | |
|   databaseName: 'postgres',
 | |
|   schemaName: 'public',
 | |
|   functions: [],
 | |
|   enums: [],
 | |
|   extensions: [],
 | |
|   parameters: [],
 | |
|   overrides: [],
 | |
|   tables: [
 | |
|     {
 | |
|       name: 'table1',
 | |
|       columns: [
 | |
|         {
 | |
|           name: 'column-1',
 | |
|           tableName: 'table1',
 | |
|           type: 'character varying',
 | |
|           nullable: false,
 | |
|           isArray: false,
 | |
|           primary: false,
 | |
|           synchronize: true,
 | |
|         },
 | |
|       ],
 | |
|       indexes: [],
 | |
|       triggers: [],
 | |
|       constraints: [],
 | |
|       synchronize: true,
 | |
|     },
 | |
|   ],
 | |
|   warnings: [],
 | |
| };
 |