feat: extension, triggers, functions, comments, parameters management in sql-tools (#17269)

feat: sql-tools extension, triggers, functions, comments, parameters
This commit is contained in:
Jason Rasmussen
2025-04-07 15:12:12 -04:00
committed by GitHub
parent 51c2c60231
commit e7a5b96ed0
170 changed files with 5205 additions and 2295 deletions

View File

@@ -0,0 +1,21 @@
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`]);
});
});
});