Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: cleanup type definitions #1351

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

Shinigami92
Copy link
Collaborator

@Shinigami92 Shinigami92 commented Feb 21, 2025

Basically this PR moves all ./types.ts type definitions either to new locations, or are merged together.

There is no MigrationBuilderImpl now anymore and just merged as MigrationBuilder

@Shinigami92 Shinigami92 added breaking change Cannot be merged when next version is not a major release c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs p: 1-normal Nothing urgent labels Feb 21, 2025
@Shinigami92 Shinigami92 added this to the v8.0 milestone Feb 21, 2025
@Shinigami92 Shinigami92 self-assigned this Feb 21, 2025
Copy link

github-actions bot commented Feb 21, 2025

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 92.33% (🎯 90%)
🟰 ±0%
3193 / 3458
🟢 Statements 92.33% (🎯 90%)
🟰 ±0%
3193 / 3458
🟢 Functions 96.32% (🎯 90%)
⬆️ +0.03%
262 / 272
🟢 Branches 90.71% (🎯 85%)
⬆️ +0.02%
830 / 915
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/db.ts 83.33%
🟰 ±0%
88.88%
🟰 ±0%
87.5%
🟰 ±0%
83.33%
🟰 ±0%
90-92, 122, 125-137, 177-179
src/index.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/logger.ts 100% 100% 100% 100%
src/migration.ts 73.38%
🟰 ±0%
87.27%
🟰 ±0%
66.66%
🟰 ±0%
73.38%
🟰 ±0%
147-150, 171-187, 226-232, 237-275, 332-333, 359-361, 369-370, 387-390, 419-420
src/migrationBuilder.ts 95.41%
🟰 ±0%
92.85%
🟰 ±0%
88.88%
🟰 ±0%
95.41%
🟰 ±0%
824-828, 967-972, 1009-1010
src/migrationOptions.ts 100% 100% 100% 100%
src/pgType.ts 100% 100% 100% 100%
src/runner.ts 78.87%
🟰 ±0%
59.25%
🟰 ±0%
100%
🟰 ±0%
78.87%
🟰 ±0%
181, 201-202, 211-212, 261-262, 304-307, 316-320, 333, 345-348, 371, 373-379, 382, 395, 407-420, 423-426, 446-448, 457, 459-468
src/sqlMigration.ts 90%
🟰 ±0%
100%
🟰 ±0%
80%
🟰 ±0%
90%
🟰 ±0%
54-58
src/operations/sql.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/casts/createCast.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/casts/dropCast.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/domains/alterDomain.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/domains/createDomain.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/domains/dropDomain.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/domains/renameDomain.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/extensions/createExtension.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/extensions/dropExtension.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/functions/createFunction.ts 95.52%
🟰 ±0%
94.44%
🟰 ±0%
100%
🟰 ±0%
95.52%
🟰 ±0%
71-73
src/operations/functions/dropFunction.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/functions/renameFunction.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/grants/grantOnSchemas.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/grants/grantOnTables.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/grants/grantRoles.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/grants/revokeOnSchemas.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/grants/revokeOnTables.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/grants/revokeRoles.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/grants/shared.ts 95.45%
🟰 ±0%
85.71%
🟰 ±0%
100%
🟰 ±0%
95.45%
🟰 ±0%
71
src/operations/indexes/createIndex.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/indexes/dropIndex.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/indexes/shared.ts 88%
🟰 ±0%
86.36%
🟰 ±0%
100%
🟰 ±0%
88%
🟰 ±0%
23, 33-36, 48
src/operations/materializedViews/alterMaterializedView.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/materializedViews/createMaterializedView.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/materializedViews/dropMaterializedView.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/materializedViews/refreshMaterializedView.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/materializedViews/renameMaterializedView.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/materializedViews/renameMaterializedViewColumn.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/operators/addToOperatorFamily.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/operators/createOperator.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/operators/createOperatorClass.ts 100%
🟰 ±0%
83.33%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/operators/createOperatorFamily.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/operators/dropOperator.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/operators/dropOperatorClass.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/operators/dropOperatorFamily.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/operators/removeFromOperatorFamily.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/operators/renameOperatorClass.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/operators/renameOperatorFamily.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/operators/shared.ts 85%
🟰 ±0%
75%
🟰 ±0%
100%
🟰 ±0%
85%
🟰 ±0%
24-25, 38
src/operations/policies/alterPolicy.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/policies/createPolicy.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/policies/dropPolicy.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/policies/renamePolicy.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/roles/alterRole.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/roles/createRole.ts 100%
🟰 ±0%
75%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/roles/dropRole.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/roles/renameRole.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/schemas/createSchema.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/schemas/dropSchema.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/schemas/renameSchema.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/sequences/alterSequence.ts 93.75%
🟰 ±0%
75%
🟰 ±0%
100%
🟰 ±0%
93.75%
🟰 ±0%
23
src/operations/sequences/createSequence.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/sequences/dropSequence.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/sequences/renameSequence.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/tables/addColumns.ts 100%
🟰 ±0%
80%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/tables/addConstraint.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/tables/alterColumn.ts 89.33%
🟰 ±0%
77.77%
🟰 ±0%
100%
🟰 ±0%
89.33%
🟰 ±0%
69, 76-83
src/operations/tables/alterTable.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/tables/createTable.ts 88.52%
🟰 ±0%
76.47%
🟰 ±0%
100%
🟰 ±0%
88.52%
🟰 ±0%
50-54, 86-87
src/operations/tables/dropColumns.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/tables/dropConstraint.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/tables/dropTable.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/tables/renameColumn.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/tables/renameConstraint.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/tables/renameTable.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/tables/shared.ts 82.41%
🟰 ±0%
79.68%
🟰 ±0%
80%
🟰 ±0%
82.41%
🟰 ±0%
151-152, 155-156, 209-213, 239-240, 259-260, 285-286, 289-296, 299-300, 437-462
src/operations/triggers/createTrigger.ts 86.25%
🟰 ±0%
68.18%
🟰 ±0%
100%
🟰 ±0%
86.25%
🟰 ±0%
53-54, 66-67, 70-71, 74-77, 113
src/operations/triggers/dropTrigger.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/triggers/renameTrigger.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/types/addTypeAttribute.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/types/addTypeValue.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/types/createType.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/types/dropType.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/types/dropTypeAttribute.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/types/renameType.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/types/renameTypeAttribute.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/types/renameTypeValue.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/types/setTypeAttribute.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/views/alterView.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/views/alterViewColumn.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/views/createView.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/views/dropView.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/operations/views/renameView.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/utils/createTransformer.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/utils/formatParams.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
src/utils/getMigrationTableSchema.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
Unchanged Files
src/operations/casts/index.ts 100% 100% 100% 100%
src/operations/domains/index.ts 100% 100% 100% 100%
src/operations/domains/shared.ts 100% 100% 100% 100%
src/operations/extensions/index.ts 100% 100% 100% 100%
src/operations/extensions/shared.ts 100% 100% 100% 100%
src/operations/functions/index.ts 100% 100% 100% 100%
src/operations/functions/shared.ts 100% 100% 100% 100%
src/operations/grants/index.ts 100% 100% 100% 100%
src/operations/indexes/index.ts 100% 100% 100% 100%
src/operations/materializedViews/index.ts 100% 100% 100% 100%
src/operations/materializedViews/shared.ts 100% 87.5% 100% 100%
src/operations/operators/index.ts 100% 100% 100% 100%
src/operations/policies/index.ts 100% 100% 100% 100%
src/operations/policies/shared.ts 100% 100% 100% 100%
src/operations/roles/index.ts 100% 100% 100% 100%
src/operations/roles/shared.ts 98.07% 76.92% 100% 98.07% 78
src/operations/schemas/index.ts 100% 100% 100% 100%
src/operations/sequences/index.ts 100% 100% 100% 100%
src/operations/sequences/shared.ts 78.57% 68.75% 100% 78.57% 41, 43-44, 49-50, 63-64, 69-70
src/operations/tables/index.ts 100% 100% 100% 100%
src/operations/triggers/index.ts 100% 100% 100% 100%
src/operations/triggers/shared.ts 100% 100% 100% 100%
src/operations/types/index.ts 100% 100% 100% 100%
src/operations/views/index.ts 100% 100% 100% 100%
src/operations/views/shared.ts 100% 66.66% 100% 100%
src/utils/PgLiteral.ts 90.47% 100% 80% 90.47% 44-45
src/utils/StringIdGenerator.ts 100% 100% 100% 100%
src/utils/createSchemalize.ts 100% 100% 100% 100%
src/utils/decamelize.ts 100% 100% 100% 100%
src/utils/escapeValue.ts 100% 100% 100% 100%
src/utils/formatLines.ts 100% 100% 100% 100%
src/utils/formatPartitionColumns.ts 100% 100% 100% 100%
src/utils/getSchemas.ts 100% 100% 100% 100%
src/utils/identity.ts 100% 100% 100% 100%
src/utils/index.ts 100% 100% 100% 100%
src/utils/intersection.ts 100% 100% 100% 100%
src/utils/makeComment.ts 100% 100% 100% 100%
src/utils/quote.ts 100% 100% 100% 100%
src/utils/toArray.ts 100% 100% 100% 100%
src/utils/types.ts 100% 100% 100% 100%
Generated in workflow #1672 for commit 44a883a by the Vitest Coverage Report Action

@Shinigami92 Shinigami92 force-pushed the refactor-cleanup-type-definitions branch 3 times, most recently from 7ba013b to 44a883a Compare February 21, 2025 16:32
@Shinigami92 Shinigami92 marked this pull request as ready for review February 21, 2025 16:34
@Shinigami92 Shinigami92 merged commit 7d0a4d9 into main Feb 21, 2025
36 checks passed
@Shinigami92 Shinigami92 deleted the refactor-cleanup-type-definitions branch February 21, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Cannot be merged when next version is not a major release c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant