feat: implement QuestionBank CRUD with pagination and template query
- Add pagination support to findAll (page, limit query params) - Add findByTemplateId method to service - Add GET /by-template/:templateId endpoint to controller - Service already includes CRUD for QuestionBank and QuestionBankItem
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class RemoveSupportsVisionColumn1739260000000 implements MigrationInterface {
|
||||
name = 'RemoveSupportsVisionColumn1739260000000';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
// Remove supportsVision column from model_configs table
|
||||
// This column is no longer needed as we now use ModelType.VISION instead
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE "model_configs" DROP COLUMN "supportsVision"
|
||||
`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
// Restore supportsVision column in case of rollback
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE "model_configs" ADD COLUMN "supportsVision" boolean NOT NULL DEFAULT 0
|
||||
`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user