mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 15:34:13 +00:00 
			
		
		
		
	perf(backend): delete useless indexes
This commit is contained in:
		
							parent
							
								
									fb63fc1213
								
							
						
					
					
						commit
						55c14aec2c
					
				
					 2 changed files with 18 additions and 2 deletions
				
			
		
							
								
								
									
										18
									
								
								packages/backend/migration/1696405744672-clean-up.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								packages/backend/migration/1696405744672-clean-up.js
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,18 @@
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * SPDX-FileCopyrightText: syuilo and other misskey contributors
 | 
				
			||||||
 | 
					 * SPDX-License-Identifier: AGPL-3.0-only
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export class CleanUp1696405744672 {
 | 
				
			||||||
 | 
					    name = 'CleanUp1696405744672'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    async up(queryRunner) {
 | 
				
			||||||
 | 
					        await queryRunner.query(`DROP INDEX "public"."IDX_e7c0567f5261063592f022e9b5"`);
 | 
				
			||||||
 | 
					        await queryRunner.query(`DROP INDEX "public"."IDX_25dfc71b0369b003a4cd434d0b"`);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    async down(queryRunner) {
 | 
				
			||||||
 | 
					        await queryRunner.query(`CREATE INDEX "IDX_25dfc71b0369b003a4cd434d0b" ON "note" ("attachedFileTypes") `);
 | 
				
			||||||
 | 
					        await queryRunner.query(`CREATE INDEX "IDX_e7c0567f5261063592f022e9b5" ON "note" ("createdAt") `);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -18,7 +18,6 @@ export class MiNote {
 | 
				
			||||||
	@PrimaryColumn(id())
 | 
						@PrimaryColumn(id())
 | 
				
			||||||
	public id: string;
 | 
						public id: string;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	@Index()
 | 
					 | 
				
			||||||
	@Column('timestamp with time zone', {
 | 
						@Column('timestamp with time zone', {
 | 
				
			||||||
		comment: 'The created date of the Note.',
 | 
							comment: 'The created date of the Note.',
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
| 
						 | 
					@ -151,7 +150,6 @@ export class MiNote {
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
	public fileIds: MiDriveFile['id'][];
 | 
						public fileIds: MiDriveFile['id'][];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	@Index()
 | 
					 | 
				
			||||||
	@Column('varchar', {
 | 
						@Column('varchar', {
 | 
				
			||||||
		length: 256, array: true, default: '{}',
 | 
							length: 256, array: true, default: '{}',
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue