Files
immich/server/src/sql-tools/to-sql/index.spec.ts
Jason Rasmussen e7a5b96ed0 feat: extension, triggers, functions, comments, parameters management in sql-tools (#17269)
feat: sql-tools extension, triggers, functions, comments, parameters
2025-04-07 15:12:12 -04:00

22 lines
540 B
TypeScript

import { schemaDiffToSql } from 'src/sql-tools';
import { describe, expect, it } from 'vitest';
describe(schemaDiffToSql.name, () => {
describe('comments', () => {
it('should include the reason in a SQL comment', () => {
expect(
schemaDiffToSql(
[
{
type: 'index.drop',
indexName: 'IDX_test',
reason: 'unknown',
},
],
{ comments: true },
),
).toEqual([`DROP INDEX "IDX_test"; -- unknown`]);
});
});
});