@zyno-io/ts-server-foundation 26.712.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -0
- package/dist/devconsole/assets/index-BlWLbczn.css +1 -0
- package/dist/devconsole/assets/index-lSF6DUY3.js +3 -0
- package/dist/devconsole/index.html +13 -0
- package/dist/src/app/base.d.ts +66 -0
- package/dist/src/app/base.d.ts.map +1 -0
- package/dist/src/app/base.js +577 -0
- package/dist/src/app/base.js.map +1 -0
- package/dist/src/app/commands.d.ts +20 -0
- package/dist/src/app/commands.d.ts.map +1 -0
- package/dist/src/app/commands.js +17 -0
- package/dist/src/app/commands.js.map +1 -0
- package/dist/src/app/config-loader.d.ts +9 -0
- package/dist/src/app/config-loader.d.ts.map +1 -0
- package/dist/src/app/config-loader.js +91 -0
- package/dist/src/app/config-loader.js.map +1 -0
- package/dist/src/app/config.d.ts +96 -0
- package/dist/src/app/config.d.ts.map +1 -0
- package/dist/src/app/config.js +114 -0
- package/dist/src/app/config.js.map +1 -0
- package/dist/src/app/const.d.ts +5 -0
- package/dist/src/app/const.d.ts.map +1 -0
- package/dist/src/app/const.js +17 -0
- package/dist/src/app/const.js.map +1 -0
- package/dist/src/app/current.d.ts +5 -0
- package/dist/src/app/current.d.ts.map +1 -0
- package/dist/src/app/current.js +14 -0
- package/dist/src/app/current.js.map +1 -0
- package/dist/src/app/index.d.ts +8 -0
- package/dist/src/app/index.d.ts.map +1 -0
- package/dist/src/app/index.js +13 -0
- package/dist/src/app/index.js.map +1 -0
- package/dist/src/app/lifecycle.d.ts +9 -0
- package/dist/src/app/lifecycle.d.ts.map +1 -0
- package/dist/src/app/lifecycle.js +21 -0
- package/dist/src/app/lifecycle.js.map +1 -0
- package/dist/src/app/migrations-entrypoint.d.ts +3 -0
- package/dist/src/app/migrations-entrypoint.d.ts.map +1 -0
- package/dist/src/app/migrations-entrypoint.js +35 -0
- package/dist/src/app/migrations-entrypoint.js.map +1 -0
- package/dist/src/app/resolver.d.ts +6 -0
- package/dist/src/app/resolver.d.ts.map +1 -0
- package/dist/src/app/resolver.js +15 -0
- package/dist/src/app/resolver.js.map +1 -0
- package/dist/src/auth/index.d.ts +3 -0
- package/dist/src/auth/index.d.ts.map +1 -0
- package/dist/src/auth/index.js +15 -0
- package/dist/src/auth/index.js.map +1 -0
- package/dist/src/auth/jwt.d.ts +61 -0
- package/dist/src/auth/jwt.d.ts.map +1 -0
- package/dist/src/auth/jwt.js +379 -0
- package/dist/src/auth/jwt.js.map +1 -0
- package/dist/src/auth/provider.d.ts +21 -0
- package/dist/src/auth/provider.d.ts.map +1 -0
- package/dist/src/auth/provider.js +148 -0
- package/dist/src/auth/provider.js.map +1 -0
- package/dist/src/cli/common.d.ts +13 -0
- package/dist/src/cli/common.d.ts.map +1 -0
- package/dist/src/cli/common.js +99 -0
- package/dist/src/cli/common.js.map +1 -0
- package/dist/src/cli/tsf-create-app.d.ts +3 -0
- package/dist/src/cli/tsf-create-app.d.ts.map +1 -0
- package/dist/src/cli/tsf-create-app.js +89 -0
- package/dist/src/cli/tsf-create-app.js.map +1 -0
- package/dist/src/cli/tsf-dev.d.ts +3 -0
- package/dist/src/cli/tsf-dev.d.ts.map +1 -0
- package/dist/src/cli/tsf-dev.js +753 -0
- package/dist/src/cli/tsf-dev.js.map +1 -0
- package/dist/src/cli/tsf-gen-proto.d.ts +3 -0
- package/dist/src/cli/tsf-gen-proto.d.ts.map +1 -0
- package/dist/src/cli/tsf-gen-proto.js +134 -0
- package/dist/src/cli/tsf-gen-proto.js.map +1 -0
- package/dist/src/cli/tsf-install.d.ts +8 -0
- package/dist/src/cli/tsf-install.d.ts.map +1 -0
- package/dist/src/cli/tsf-install.js +424 -0
- package/dist/src/cli/tsf-install.js.map +1 -0
- package/dist/src/cli/tsf-migrate.d.ts +3 -0
- package/dist/src/cli/tsf-migrate.d.ts.map +1 -0
- package/dist/src/cli/tsf-migrate.js +271 -0
- package/dist/src/cli/tsf-migrate.js.map +1 -0
- package/dist/src/cli/tsf-test.d.ts +4 -0
- package/dist/src/cli/tsf-test.d.ts.map +1 -0
- package/dist/src/cli/tsf-test.js +350 -0
- package/dist/src/cli/tsf-test.js.map +1 -0
- package/dist/src/cli/tsf-update.d.ts +3 -0
- package/dist/src/cli/tsf-update.d.ts.map +1 -0
- package/dist/src/cli/tsf-update.js +12 -0
- package/dist/src/cli/tsf-update.js.map +1 -0
- package/dist/src/cli/tsf.d.ts +3 -0
- package/dist/src/cli/tsf.d.ts.map +1 -0
- package/dist/src/cli/tsf.js +29 -0
- package/dist/src/cli/tsf.js.map +1 -0
- package/dist/src/database/database.d.ts +54 -0
- package/dist/src/database/database.d.ts.map +1 -0
- package/dist/src/database/database.js +695 -0
- package/dist/src/database/database.js.map +1 -0
- package/dist/src/database/driver.d.ts +28 -0
- package/dist/src/database/driver.d.ts.map +1 -0
- package/dist/src/database/driver.js +5 -0
- package/dist/src/database/driver.js.map +1 -0
- package/dist/src/database/drivers/index.d.ts +4 -0
- package/dist/src/database/drivers/index.d.ts.map +1 -0
- package/dist/src/database/drivers/index.js +9 -0
- package/dist/src/database/drivers/index.js.map +1 -0
- package/dist/src/database/drivers/mysql-session-rpc.d.ts +40 -0
- package/dist/src/database/drivers/mysql-session-rpc.d.ts.map +1 -0
- package/dist/src/database/drivers/mysql-session-rpc.js +180 -0
- package/dist/src/database/drivers/mysql-session-rpc.js.map +1 -0
- package/dist/src/database/drivers/mysql-session.d.ts +25 -0
- package/dist/src/database/drivers/mysql-session.d.ts.map +1 -0
- package/dist/src/database/drivers/mysql-session.js +124 -0
- package/dist/src/database/drivers/mysql-session.js.map +1 -0
- package/dist/src/database/drivers/mysql.d.ts +20 -0
- package/dist/src/database/drivers/mysql.d.ts.map +1 -0
- package/dist/src/database/drivers/mysql.js +84 -0
- package/dist/src/database/drivers/mysql.js.map +1 -0
- package/dist/src/database/drivers/postgres.d.ts +22 -0
- package/dist/src/database/drivers/postgres.d.ts.map +1 -0
- package/dist/src/database/drivers/postgres.js +80 -0
- package/dist/src/database/drivers/postgres.js.map +1 -0
- package/dist/src/database/entity.d.ts +112 -0
- package/dist/src/database/entity.d.ts.map +1 -0
- package/dist/src/database/entity.js +333 -0
- package/dist/src/database/entity.js.map +1 -0
- package/dist/src/database/errors.d.ts +7 -0
- package/dist/src/database/errors.d.ts.map +1 -0
- package/dist/src/database/errors.js +34 -0
- package/dist/src/database/errors.js.map +1 -0
- package/dist/src/database/factory.d.ts +48 -0
- package/dist/src/database/factory.d.ts.map +1 -0
- package/dist/src/database/factory.js +139 -0
- package/dist/src/database/factory.js.map +1 -0
- package/dist/src/database/identifiers.d.ts +8 -0
- package/dist/src/database/identifiers.d.ts.map +1 -0
- package/dist/src/database/identifiers.js +46 -0
- package/dist/src/database/identifiers.js.map +1 -0
- package/dist/src/database/index.d.ts +14 -0
- package/dist/src/database/index.d.ts.map +1 -0
- package/dist/src/database/index.js +33 -0
- package/dist/src/database/index.js.map +1 -0
- package/dist/src/database/metadata.d.ts +27 -0
- package/dist/src/database/metadata.d.ts.map +1 -0
- package/dist/src/database/metadata.js +70 -0
- package/dist/src/database/metadata.js.map +1 -0
- package/dist/src/database/migration/create/comparator.d.ts +3 -0
- package/dist/src/database/migration/create/comparator.d.ts.map +1 -0
- package/dist/src/database/migration/create/comparator.js +302 -0
- package/dist/src/database/migration/create/comparator.js.map +1 -0
- package/dist/src/database/migration/create/db-reader.d.ts +9 -0
- package/dist/src/database/migration/create/db-reader.d.ts.map +1 -0
- package/dist/src/database/migration/create/db-reader.js +478 -0
- package/dist/src/database/migration/create/db-reader.js.map +1 -0
- package/dist/src/database/migration/create/ddl-generator.d.ts +4 -0
- package/dist/src/database/migration/create/ddl-generator.d.ts.map +1 -0
- package/dist/src/database/migration/create/ddl-generator.js +431 -0
- package/dist/src/database/migration/create/ddl-generator.js.map +1 -0
- package/dist/src/database/migration/create/entity-reader.d.ts +7 -0
- package/dist/src/database/migration/create/entity-reader.d.ts.map +1 -0
- package/dist/src/database/migration/create/entity-reader.js +169 -0
- package/dist/src/database/migration/create/entity-reader.js.map +1 -0
- package/dist/src/database/migration/create/file-generator.d.ts +7 -0
- package/dist/src/database/migration/create/file-generator.d.ts.map +1 -0
- package/dist/src/database/migration/create/file-generator.js +60 -0
- package/dist/src/database/migration/create/file-generator.js.map +1 -0
- package/dist/src/database/migration/create/index.d.ts +19 -0
- package/dist/src/database/migration/create/index.d.ts.map +1 -0
- package/dist/src/database/migration/create/index.js +102 -0
- package/dist/src/database/migration/create/index.js.map +1 -0
- package/dist/src/database/migration/create/schema-model.d.ts +99 -0
- package/dist/src/database/migration/create/schema-model.d.ts.map +1 -0
- package/dist/src/database/migration/create/schema-model.js +24 -0
- package/dist/src/database/migration/create/schema-model.js.map +1 -0
- package/dist/src/database/migration/create/type-mapper.d.ts +13 -0
- package/dist/src/database/migration/create/type-mapper.d.ts.map +1 -0
- package/dist/src/database/migration/create/type-mapper.js +293 -0
- package/dist/src/database/migration/create/type-mapper.js.map +1 -0
- package/dist/src/database/migration/index.d.ts +33 -0
- package/dist/src/database/migration/index.d.ts.map +1 -0
- package/dist/src/database/migration/index.js +165 -0
- package/dist/src/database/migration/index.js.map +1 -0
- package/dist/src/database/migration/maintenance.d.ts +26 -0
- package/dist/src/database/migration/maintenance.d.ts.map +1 -0
- package/dist/src/database/migration/maintenance.js +65 -0
- package/dist/src/database/migration/maintenance.js.map +1 -0
- package/dist/src/database/query.d.ts +79 -0
- package/dist/src/database/query.d.ts.map +1 -0
- package/dist/src/database/query.js +435 -0
- package/dist/src/database/query.js.map +1 -0
- package/dist/src/database/schema.d.ts +147 -0
- package/dist/src/database/schema.d.ts.map +1 -0
- package/dist/src/database/schema.js +709 -0
- package/dist/src/database/schema.js.map +1 -0
- package/dist/src/database/session.d.ts +63 -0
- package/dist/src/database/session.d.ts.map +1 -0
- package/dist/src/database/session.js +226 -0
- package/dist/src/database/session.js.map +1 -0
- package/dist/src/database/sql.d.ts +37 -0
- package/dist/src/database/sql.d.ts.map +1 -0
- package/dist/src/database/sql.js +143 -0
- package/dist/src/database/sql.js.map +1 -0
- package/dist/src/database/values.d.ts +6 -0
- package/dist/src/database/values.d.ts.map +1 -0
- package/dist/src/database/values.js +237 -0
- package/dist/src/database/values.js.map +1 -0
- package/dist/src/devconsole/controller.d.ts +11 -0
- package/dist/src/devconsole/controller.d.ts.map +1 -0
- package/dist/src/devconsole/controller.js +78 -0
- package/dist/src/devconsole/controller.js.map +1 -0
- package/dist/src/devconsole/generated/devconsole.d.ts +306 -0
- package/dist/src/devconsole/generated/devconsole.d.ts.map +1 -0
- package/dist/src/devconsole/generated/devconsole.js +4029 -0
- package/dist/src/devconsole/generated/devconsole.js.map +1 -0
- package/dist/src/devconsole/index.d.ts +10 -0
- package/dist/src/devconsole/index.d.ts.map +1 -0
- package/dist/src/devconsole/index.js +26 -0
- package/dist/src/devconsole/index.js.map +1 -0
- package/dist/src/devconsole/observers.d.ts +4 -0
- package/dist/src/devconsole/observers.d.ts.map +1 -0
- package/dist/src/devconsole/observers.js +170 -0
- package/dist/src/devconsole/observers.js.map +1 -0
- package/dist/src/devconsole/runtime.d.ts +16 -0
- package/dist/src/devconsole/runtime.d.ts.map +1 -0
- package/dist/src/devconsole/runtime.js +48 -0
- package/dist/src/devconsole/runtime.js.map +1 -0
- package/dist/src/devconsole/security.d.ts +8 -0
- package/dist/src/devconsole/security.d.ts.map +1 -0
- package/dist/src/devconsole/security.js +33 -0
- package/dist/src/devconsole/security.js.map +1 -0
- package/dist/src/devconsole/server.d.ts +25 -0
- package/dist/src/devconsole/server.d.ts.map +1 -0
- package/dist/src/devconsole/server.js +452 -0
- package/dist/src/devconsole/server.js.map +1 -0
- package/dist/src/devconsole/store.d.ts +111 -0
- package/dist/src/devconsole/store.d.ts.map +1 -0
- package/dist/src/devconsole/store.js +177 -0
- package/dist/src/devconsole/store.js.map +1 -0
- package/dist/src/di/container.d.ts +38 -0
- package/dist/src/di/container.d.ts.map +1 -0
- package/dist/src/di/container.js +252 -0
- package/dist/src/di/container.js.map +1 -0
- package/dist/src/di/errors.d.ts +18 -0
- package/dist/src/di/errors.d.ts.map +1 -0
- package/dist/src/di/errors.js +71 -0
- package/dist/src/di/errors.js.map +1 -0
- package/dist/src/di/index.d.ts +5 -0
- package/dist/src/di/index.d.ts.map +1 -0
- package/dist/src/di/index.js +10 -0
- package/dist/src/di/index.js.map +1 -0
- package/dist/src/di/module.d.ts +29 -0
- package/dist/src/di/module.d.ts.map +1 -0
- package/dist/src/di/module.js +42 -0
- package/dist/src/di/module.js.map +1 -0
- package/dist/src/di/provider.d.ts +34 -0
- package/dist/src/di/provider.d.ts.map +1 -0
- package/dist/src/di/provider.js +24 -0
- package/dist/src/di/provider.js.map +1 -0
- package/dist/src/env.d.ts +122 -0
- package/dist/src/env.d.ts.map +1 -0
- package/dist/src/env.js +61 -0
- package/dist/src/env.js.map +1 -0
- package/dist/src/events/event-bus.d.ts +26 -0
- package/dist/src/events/event-bus.d.ts.map +1 -0
- package/dist/src/events/event-bus.js +67 -0
- package/dist/src/events/event-bus.js.map +1 -0
- package/dist/src/events/index.d.ts +2 -0
- package/dist/src/events/index.d.ts.map +1 -0
- package/dist/src/events/index.js +7 -0
- package/dist/src/events/index.js.map +1 -0
- package/dist/src/health/healthcheck.controller.d.ts +9 -0
- package/dist/src/health/healthcheck.controller.d.ts.map +1 -0
- package/dist/src/health/healthcheck.controller.js +33 -0
- package/dist/src/health/healthcheck.controller.js.map +1 -0
- package/dist/src/health/healthcheck.service.d.ts +13 -0
- package/dist/src/health/healthcheck.service.d.ts.map +1 -0
- package/dist/src/health/healthcheck.service.js +37 -0
- package/dist/src/health/healthcheck.service.js.map +1 -0
- package/dist/src/health/index.d.ts +3 -0
- package/dist/src/health/index.d.ts.map +1 -0
- package/dist/src/health/index.js +8 -0
- package/dist/src/health/index.js.map +1 -0
- package/dist/src/helpers/async/context.d.ts +10 -0
- package/dist/src/helpers/async/context.d.ts.map +1 -0
- package/dist/src/helpers/async/context.js +52 -0
- package/dist/src/helpers/async/context.js.map +1 -0
- package/dist/src/helpers/async/process.d.ts +16 -0
- package/dist/src/helpers/async/process.d.ts.map +1 -0
- package/dist/src/helpers/async/process.js +62 -0
- package/dist/src/helpers/async/process.js.map +1 -0
- package/dist/src/helpers/async/promise.d.ts +11 -0
- package/dist/src/helpers/async/promise.d.ts.map +1 -0
- package/dist/src/helpers/async/promise.js +32 -0
- package/dist/src/helpers/async/promise.js.map +1 -0
- package/dist/src/helpers/data/array.d.ts +5 -0
- package/dist/src/helpers/data/array.d.ts.map +1 -0
- package/dist/src/helpers/data/array.js +27 -0
- package/dist/src/helpers/data/array.js.map +1 -0
- package/dist/src/helpers/data/objects.d.ts +13 -0
- package/dist/src/helpers/data/objects.d.ts.map +1 -0
- package/dist/src/helpers/data/objects.js +55 -0
- package/dist/src/helpers/data/objects.js.map +1 -0
- package/dist/src/helpers/data/serialization.d.ts +5 -0
- package/dist/src/helpers/data/serialization.d.ts.map +1 -0
- package/dist/src/helpers/data/serialization.js +25 -0
- package/dist/src/helpers/data/serialization.js.map +1 -0
- package/dist/src/helpers/data/transformer.d.ts +13 -0
- package/dist/src/helpers/data/transformer.d.ts.map +1 -0
- package/dist/src/helpers/data/transformer.js +50 -0
- package/dist/src/helpers/data/transformer.js.map +1 -0
- package/dist/src/helpers/index.d.ts +19 -0
- package/dist/src/helpers/index.d.ts.map +1 -0
- package/dist/src/helpers/index.js +30 -0
- package/dist/src/helpers/index.js.map +1 -0
- package/dist/src/helpers/io/package.d.ts +10 -0
- package/dist/src/helpers/io/package.d.ts.map +1 -0
- package/dist/src/helpers/io/package.js +35 -0
- package/dist/src/helpers/io/package.js.map +1 -0
- package/dist/src/helpers/io/stream.d.ts +18 -0
- package/dist/src/helpers/io/stream.d.ts.map +1 -0
- package/dist/src/helpers/io/stream.js +131 -0
- package/dist/src/helpers/io/stream.js.map +1 -0
- package/dist/src/helpers/redis/broadcast.d.ts +15 -0
- package/dist/src/helpers/redis/broadcast.d.ts.map +1 -0
- package/dist/src/helpers/redis/broadcast.js +93 -0
- package/dist/src/helpers/redis/broadcast.js.map +1 -0
- package/dist/src/helpers/redis/cache.d.ts +20 -0
- package/dist/src/helpers/redis/cache.d.ts.map +1 -0
- package/dist/src/helpers/redis/cache.js +57 -0
- package/dist/src/helpers/redis/cache.js.map +1 -0
- package/dist/src/helpers/redis/mutex.d.ts +45 -0
- package/dist/src/helpers/redis/mutex.d.ts.map +1 -0
- package/dist/src/helpers/redis/mutex.js +446 -0
- package/dist/src/helpers/redis/mutex.js.map +1 -0
- package/dist/src/helpers/redis/redis.d.ts +12 -0
- package/dist/src/helpers/redis/redis.d.ts.map +1 -0
- package/dist/src/helpers/redis/redis.js +62 -0
- package/dist/src/helpers/redis/redis.js.map +1 -0
- package/dist/src/helpers/security/crypto.d.ts +31 -0
- package/dist/src/helpers/security/crypto.d.ts.map +1 -0
- package/dist/src/helpers/security/crypto.js +108 -0
- package/dist/src/helpers/security/crypto.js.map +1 -0
- package/dist/src/helpers/security/validation.d.ts +3 -0
- package/dist/src/helpers/security/validation.d.ts.map +1 -0
- package/dist/src/helpers/security/validation.js +14 -0
- package/dist/src/helpers/security/validation.js.map +1 -0
- package/dist/src/helpers/utils/date.d.ts +4 -0
- package/dist/src/helpers/utils/date.d.ts.map +1 -0
- package/dist/src/helpers/utils/date.js +16 -0
- package/dist/src/helpers/utils/date.js.map +1 -0
- package/dist/src/helpers/utils/error.d.ts +20 -0
- package/dist/src/helpers/utils/error.d.ts.map +1 -0
- package/dist/src/helpers/utils/error.js +164 -0
- package/dist/src/helpers/utils/error.js.map +1 -0
- package/dist/src/helpers/utils/uuid.d.ts +5 -0
- package/dist/src/helpers/utils/uuid.d.ts.map +1 -0
- package/dist/src/helpers/utils/uuid.js +13 -0
- package/dist/src/helpers/utils/uuid.js.map +1 -0
- package/dist/src/http/auth.d.ts +20 -0
- package/dist/src/http/auth.d.ts.map +1 -0
- package/dist/src/http/auth.js +68 -0
- package/dist/src/http/auth.js.map +1 -0
- package/dist/src/http/base.d.ts +57 -0
- package/dist/src/http/base.d.ts.map +1 -0
- package/dist/src/http/base.js +331 -0
- package/dist/src/http/base.js.map +1 -0
- package/dist/src/http/context.d.ts +6 -0
- package/dist/src/http/context.d.ts.map +1 -0
- package/dist/src/http/context.js +26 -0
- package/dist/src/http/context.js.map +1 -0
- package/dist/src/http/cors.d.ts +25 -0
- package/dist/src/http/cors.d.ts.map +1 -0
- package/dist/src/http/cors.js +124 -0
- package/dist/src/http/cors.js.map +1 -0
- package/dist/src/http/decorators.d.ts +64 -0
- package/dist/src/http/decorators.d.ts.map +1 -0
- package/dist/src/http/decorators.js +102 -0
- package/dist/src/http/decorators.js.map +1 -0
- package/dist/src/http/errors.d.ts +50 -0
- package/dist/src/http/errors.d.ts.map +1 -0
- package/dist/src/http/errors.js +158 -0
- package/dist/src/http/errors.js.map +1 -0
- package/dist/src/http/index.d.ts +31 -0
- package/dist/src/http/index.d.ts.map +1 -0
- package/dist/src/http/index.js +33 -0
- package/dist/src/http/index.js.map +1 -0
- package/dist/src/http/middleware.d.ts +12 -0
- package/dist/src/http/middleware.d.ts.map +1 -0
- package/dist/src/http/middleware.js +31 -0
- package/dist/src/http/middleware.js.map +1 -0
- package/dist/src/http/parameter-resolvers.d.ts +3 -0
- package/dist/src/http/parameter-resolvers.d.ts.map +1 -0
- package/dist/src/http/parameter-resolvers.js +8 -0
- package/dist/src/http/parameter-resolvers.js.map +1 -0
- package/dist/src/http/request-logging.d.ts +34 -0
- package/dist/src/http/request-logging.d.ts.map +1 -0
- package/dist/src/http/request-logging.js +130 -0
- package/dist/src/http/request-logging.js.map +1 -0
- package/dist/src/http/request.d.ts +69 -0
- package/dist/src/http/request.d.ts.map +1 -0
- package/dist/src/http/request.js +366 -0
- package/dist/src/http/request.js.map +1 -0
- package/dist/src/http/response.d.ts +98 -0
- package/dist/src/http/response.d.ts.map +1 -0
- package/dist/src/http/response.js +292 -0
- package/dist/src/http/response.js.map +1 -0
- package/dist/src/http/router.d.ts +100 -0
- package/dist/src/http/router.d.ts.map +1 -0
- package/dist/src/http/router.js +1085 -0
- package/dist/src/http/router.js.map +1 -0
- package/dist/src/http/startup-logging.d.ts +8 -0
- package/dist/src/http/startup-logging.d.ts.map +1 -0
- package/dist/src/http/startup-logging.js +55 -0
- package/dist/src/http/startup-logging.js.map +1 -0
- package/dist/src/http/static-files.d.ts +15 -0
- package/dist/src/http/static-files.d.ts.map +1 -0
- package/dist/src/http/static-files.js +110 -0
- package/dist/src/http/static-files.js.map +1 -0
- package/dist/src/http/store.d.ts +8 -0
- package/dist/src/http/store.d.ts.map +1 -0
- package/dist/src/http/store.js +47 -0
- package/dist/src/http/store.js.map +1 -0
- package/dist/src/http/types.d.ts +23 -0
- package/dist/src/http/types.d.ts.map +1 -0
- package/dist/src/http/types.js +3 -0
- package/dist/src/http/types.js.map +1 -0
- package/dist/src/http/upgrade.d.ts +22 -0
- package/dist/src/http/upgrade.d.ts.map +1 -0
- package/dist/src/http/upgrade.js +164 -0
- package/dist/src/http/upgrade.js.map +1 -0
- package/dist/src/http/uploads.d.ts +36 -0
- package/dist/src/http/uploads.d.ts.map +1 -0
- package/dist/src/http/uploads.js +287 -0
- package/dist/src/http/uploads.js.map +1 -0
- package/dist/src/http/workflow.d.ts +34 -0
- package/dist/src/http/workflow.d.ts.map +1 -0
- package/dist/src/http/workflow.js +40 -0
- package/dist/src/http/workflow.js.map +1 -0
- package/dist/src/index.d.ts +21 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +88 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/openapi/controller.d.ts +9 -0
- package/dist/src/openapi/controller.d.ts.map +1 -0
- package/dist/src/openapi/controller.js +45 -0
- package/dist/src/openapi/controller.js.map +1 -0
- package/dist/src/openapi/index.d.ts +5 -0
- package/dist/src/openapi/index.d.ts.map +1 -0
- package/dist/src/openapi/index.js +21 -0
- package/dist/src/openapi/index.js.map +1 -0
- package/dist/src/openapi/schema.d.ts +26 -0
- package/dist/src/openapi/schema.d.ts.map +1 -0
- package/dist/src/openapi/schema.js +1128 -0
- package/dist/src/openapi/schema.js.map +1 -0
- package/dist/src/openapi/serializer.d.ts +16 -0
- package/dist/src/openapi/serializer.d.ts.map +1 -0
- package/dist/src/openapi/serializer.js +506 -0
- package/dist/src/openapi/serializer.js.map +1 -0
- package/dist/src/openapi/types.d.ts +84 -0
- package/dist/src/openapi/types.d.ts.map +1 -0
- package/dist/src/openapi/types.js +5 -0
- package/dist/src/openapi/types.js.map +1 -0
- package/dist/src/reflection/annotations.d.ts +15 -0
- package/dist/src/reflection/annotations.d.ts.map +1 -0
- package/dist/src/reflection/annotations.js +228 -0
- package/dist/src/reflection/annotations.js.map +1 -0
- package/dist/src/reflection/conversion.d.ts +15 -0
- package/dist/src/reflection/conversion.d.ts.map +1 -0
- package/dist/src/reflection/conversion.js +360 -0
- package/dist/src/reflection/conversion.js.map +1 -0
- package/dist/src/reflection/deserializer.d.ts +15 -0
- package/dist/src/reflection/deserializer.d.ts.map +1 -0
- package/dist/src/reflection/deserializer.js +42 -0
- package/dist/src/reflection/deserializer.js.map +1 -0
- package/dist/src/reflection/entity.d.ts +9 -0
- package/dist/src/reflection/entity.d.ts.map +1 -0
- package/dist/src/reflection/entity.js +74 -0
- package/dist/src/reflection/entity.js.map +1 -0
- package/dist/src/reflection/errors.d.ts +8 -0
- package/dist/src/reflection/errors.d.ts.map +1 -0
- package/dist/src/reflection/errors.js +21 -0
- package/dist/src/reflection/errors.js.map +1 -0
- package/dist/src/reflection/index.d.ts +8 -0
- package/dist/src/reflection/index.d.ts.map +1 -0
- package/dist/src/reflection/index.js +13 -0
- package/dist/src/reflection/index.js.map +1 -0
- package/dist/src/reflection/metadata-store.d.ts +14 -0
- package/dist/src/reflection/metadata-store.d.ts.map +1 -0
- package/dist/src/reflection/metadata-store.js +18 -0
- package/dist/src/reflection/metadata-store.js.map +1 -0
- package/dist/src/reflection/model.d.ts +271 -0
- package/dist/src/reflection/model.d.ts.map +1 -0
- package/dist/src/reflection/model.js +36 -0
- package/dist/src/reflection/model.js.map +1 -0
- package/dist/src/reflection/reflection-class.d.ts +60 -0
- package/dist/src/reflection/reflection-class.d.ts.map +1 -0
- package/dist/src/reflection/reflection-class.js +263 -0
- package/dist/src/reflection/reflection-class.js.map +1 -0
- package/dist/src/reflection/type-utils.d.ts +34 -0
- package/dist/src/reflection/type-utils.d.ts.map +1 -0
- package/dist/src/reflection/type-utils.js +485 -0
- package/dist/src/reflection/type-utils.js.map +1 -0
- package/dist/src/reflection.d.ts +2 -0
- package/dist/src/reflection.d.ts.map +1 -0
- package/dist/src/reflection.js +5 -0
- package/dist/src/reflection.js.map +1 -0
- package/dist/src/services/cli.d.ts +9 -0
- package/dist/src/services/cli.d.ts.map +1 -0
- package/dist/src/services/cli.js +47 -0
- package/dist/src/services/cli.js.map +1 -0
- package/dist/src/services/index.d.ts +8 -0
- package/dist/src/services/index.d.ts.map +1 -0
- package/dist/src/services/index.js +13 -0
- package/dist/src/services/index.js.map +1 -0
- package/dist/src/services/leader.d.ts +31 -0
- package/dist/src/services/leader.d.ts.map +1 -0
- package/dist/src/services/leader.js +176 -0
- package/dist/src/services/leader.js.map +1 -0
- package/dist/src/services/logger.d.ts +60 -0
- package/dist/src/services/logger.d.ts.map +1 -0
- package/dist/src/services/logger.js +349 -0
- package/dist/src/services/logger.js.map +1 -0
- package/dist/src/services/mail/index.d.ts +57 -0
- package/dist/src/services/mail/index.d.ts.map +1 -0
- package/dist/src/services/mail/index.js +89 -0
- package/dist/src/services/mail/index.js.map +1 -0
- package/dist/src/services/mail/postmark.d.ts +11 -0
- package/dist/src/services/mail/postmark.d.ts.map +1 -0
- package/dist/src/services/mail/postmark.js +41 -0
- package/dist/src/services/mail/postmark.js.map +1 -0
- package/dist/src/services/mail/smtp.d.ts +11 -0
- package/dist/src/services/mail/smtp.d.ts.map +1 -0
- package/dist/src/services/mail/smtp.js +50 -0
- package/dist/src/services/mail/smtp.js.map +1 -0
- package/dist/src/services/mesh-client/index.d.ts +9 -0
- package/dist/src/services/mesh-client/index.d.ts.map +1 -0
- package/dist/src/services/mesh-client/index.js +18 -0
- package/dist/src/services/mesh-client/index.js.map +1 -0
- package/dist/src/services/mesh-client/mesh-client-redis-registry.d.ts +23 -0
- package/dist/src/services/mesh-client/mesh-client-redis-registry.d.ts.map +1 -0
- package/dist/src/services/mesh-client/mesh-client-redis-registry.js +360 -0
- package/dist/src/services/mesh-client/mesh-client-redis-registry.js.map +1 -0
- package/dist/src/services/mesh-client/mesh-client-registry.d.ts +16 -0
- package/dist/src/services/mesh-client/mesh-client-registry.d.ts.map +1 -0
- package/dist/src/services/mesh-client/mesh-client-registry.js +44 -0
- package/dist/src/services/mesh-client/mesh-client-registry.js.map +1 -0
- package/dist/src/services/mesh-client/mesh-client-service.d.ts +88 -0
- package/dist/src/services/mesh-client/mesh-client-service.d.ts.map +1 -0
- package/dist/src/services/mesh-client/mesh-client-service.js +222 -0
- package/dist/src/services/mesh-client/mesh-client-service.js.map +1 -0
- package/dist/src/services/mesh-client/mesh-srpc-server.d.ts +95 -0
- package/dist/src/services/mesh-client/mesh-srpc-server.d.ts.map +1 -0
- package/dist/src/services/mesh-client/mesh-srpc-server.js +475 -0
- package/dist/src/services/mesh-client/mesh-srpc-server.js.map +1 -0
- package/dist/src/services/mesh-client/types.d.ts +36 -0
- package/dist/src/services/mesh-client/types.d.ts.map +1 -0
- package/dist/src/services/mesh-client/types.js +38 -0
- package/dist/src/services/mesh-client/types.js.map +1 -0
- package/dist/src/services/mesh.d.ts +73 -0
- package/dist/src/services/mesh.d.ts.map +1 -0
- package/dist/src/services/mesh.js +511 -0
- package/dist/src/services/mesh.js.map +1 -0
- package/dist/src/services/worker/entity.d.ts +26 -0
- package/dist/src/services/worker/entity.d.ts.map +1 -0
- package/dist/src/services/worker/entity.js +30 -0
- package/dist/src/services/worker/entity.js.map +1 -0
- package/dist/src/services/worker/index.d.ts +25 -0
- package/dist/src/services/worker/index.d.ts.map +1 -0
- package/dist/src/services/worker/index.js +52 -0
- package/dist/src/services/worker/index.js.map +1 -0
- package/dist/src/services/worker/observer.d.ts +13 -0
- package/dist/src/services/worker/observer.d.ts.map +1 -0
- package/dist/src/services/worker/observer.js +22 -0
- package/dist/src/services/worker/observer.js.map +1 -0
- package/dist/src/services/worker/queue.d.ts +38 -0
- package/dist/src/services/worker/queue.d.ts.map +1 -0
- package/dist/src/services/worker/queue.js +227 -0
- package/dist/src/services/worker/queue.js.map +1 -0
- package/dist/src/services/worker/recorder.d.ts +17 -0
- package/dist/src/services/worker/recorder.d.ts.map +1 -0
- package/dist/src/services/worker/recorder.js +88 -0
- package/dist/src/services/worker/recorder.js.map +1 -0
- package/dist/src/services/worker/runner.d.ts +37 -0
- package/dist/src/services/worker/runner.d.ts.map +1 -0
- package/dist/src/services/worker/runner.js +319 -0
- package/dist/src/services/worker/runner.js.map +1 -0
- package/dist/src/services/worker/types.d.ts +63 -0
- package/dist/src/services/worker/types.d.ts.map +1 -0
- package/dist/src/services/worker/types.js +38 -0
- package/dist/src/services/worker/types.js.map +1 -0
- package/dist/src/srpc/SrpcByteStream.d.ts +60 -0
- package/dist/src/srpc/SrpcByteStream.d.ts.map +1 -0
- package/dist/src/srpc/SrpcByteStream.js +237 -0
- package/dist/src/srpc/SrpcByteStream.js.map +1 -0
- package/dist/src/srpc/SrpcClient.d.ts +67 -0
- package/dist/src/srpc/SrpcClient.d.ts.map +1 -0
- package/dist/src/srpc/SrpcClient.js +406 -0
- package/dist/src/srpc/SrpcClient.js.map +1 -0
- package/dist/src/srpc/SrpcServer.d.ts +56 -0
- package/dist/src/srpc/SrpcServer.d.ts.map +1 -0
- package/dist/src/srpc/SrpcServer.js +519 -0
- package/dist/src/srpc/SrpcServer.js.map +1 -0
- package/dist/src/srpc/index.d.ts +9 -0
- package/dist/src/srpc/index.d.ts.map +1 -0
- package/dist/src/srpc/index.js +17 -0
- package/dist/src/srpc/index.js.map +1 -0
- package/dist/src/srpc/observer.d.ts +21 -0
- package/dist/src/srpc/observer.d.ts.map +1 -0
- package/dist/src/srpc/observer.js +22 -0
- package/dist/src/srpc/observer.js.map +1 -0
- package/dist/src/srpc/types.d.ts +92 -0
- package/dist/src/srpc/types.d.ts.map +1 -0
- package/dist/src/srpc/types.js +28 -0
- package/dist/src/srpc/types.js.map +1 -0
- package/dist/src/telemetry/index.d.ts +3 -0
- package/dist/src/telemetry/index.d.ts.map +1 -0
- package/dist/src/telemetry/index.js +22 -0
- package/dist/src/telemetry/index.js.map +1 -0
- package/dist/src/telemetry/otel/helpers.d.ts +45 -0
- package/dist/src/telemetry/otel/helpers.d.ts.map +1 -0
- package/dist/src/telemetry/otel/helpers.js +142 -0
- package/dist/src/telemetry/otel/helpers.js.map +1 -0
- package/dist/src/telemetry/otel/index.d.ts +22 -0
- package/dist/src/telemetry/otel/index.d.ts.map +1 -0
- package/dist/src/telemetry/otel/index.js +268 -0
- package/dist/src/telemetry/otel/index.js.map +1 -0
- package/dist/src/telemetry/otel/metrics.controller.d.ts +5 -0
- package/dist/src/telemetry/otel/metrics.controller.d.ts.map +1 -0
- package/dist/src/telemetry/otel/metrics.controller.js +82 -0
- package/dist/src/telemetry/otel/metrics.controller.js.map +1 -0
- package/dist/src/telemetry/otel/metrics.d.ts +2 -0
- package/dist/src/telemetry/otel/metrics.d.ts.map +1 -0
- package/dist/src/telemetry/otel/metrics.js +16 -0
- package/dist/src/telemetry/otel/metrics.js.map +1 -0
- package/dist/src/telemetry/sentry.d.ts +9 -0
- package/dist/src/telemetry/sentry.d.ts.map +1 -0
- package/dist/src/telemetry/sentry.js +63 -0
- package/dist/src/telemetry/sentry.js.map +1 -0
- package/dist/src/testing/database-readiness.d.ts +11 -0
- package/dist/src/testing/database-readiness.d.ts.map +1 -0
- package/dist/src/testing/database-readiness.js +102 -0
- package/dist/src/testing/database-readiness.js.map +1 -0
- package/dist/src/testing/expect.d.ts +21 -0
- package/dist/src/testing/expect.d.ts.map +1 -0
- package/dist/src/testing/expect.js +110 -0
- package/dist/src/testing/expect.js.map +1 -0
- package/dist/src/testing/fixtures.d.ts +18 -0
- package/dist/src/testing/fixtures.d.ts.map +1 -0
- package/dist/src/testing/fixtures.js +46 -0
- package/dist/src/testing/fixtures.js.map +1 -0
- package/dist/src/testing/index.d.ts +143 -0
- package/dist/src/testing/index.d.ts.map +1 -0
- package/dist/src/testing/index.js +993 -0
- package/dist/src/testing/index.js.map +1 -0
- package/dist/src/testing/mysql-session-manager-process.d.ts +3 -0
- package/dist/src/testing/mysql-session-manager-process.d.ts.map +1 -0
- package/dist/src/testing/mysql-session-manager-process.js +77 -0
- package/dist/src/testing/mysql-session-manager-process.js.map +1 -0
- package/dist/src/testing/mysql-session-manager.d.ts +59 -0
- package/dist/src/testing/mysql-session-manager.d.ts.map +1 -0
- package/dist/src/testing/mysql-session-manager.js +910 -0
- package/dist/src/testing/mysql-session-manager.js.map +1 -0
- package/dist/src/testing/sql.d.ts +47 -0
- package/dist/src/testing/sql.d.ts.map +1 -0
- package/dist/src/testing/sql.js +313 -0
- package/dist/src/testing/sql.js.map +1 -0
- package/dist/src/type-compiler/go/ast_expression.go +161 -0
- package/dist/src/type-compiler/go/ast_metadata.go +355 -0
- package/dist/src/type-compiler/go/collect.go +806 -0
- package/dist/src/type-compiler/go/emission_plan.go +205 -0
- package/dist/src/type-compiler/go/emit_ast.go +406 -0
- package/dist/src/type-compiler/go/emit_ast_test.go +248 -0
- package/dist/src/type-compiler/go/go.mod +10 -0
- package/dist/src/type-compiler/go/plugin.go +308 -0
- package/dist/src/type-compiler/go/plugin_test.go +752 -0
- package/dist/src/type-compiler/go/precompute.go +86 -0
- package/dist/src/type-compiler/go/receive_type.go +837 -0
- package/dist/src/type-compiler/go/resolve.go +265 -0
- package/dist/src/type-compiler/go/source_scan.go +51 -0
- package/dist/src/type-compiler/go/text_parse.go +671 -0
- package/dist/src/type-compiler/go/type_expr.go +1227 -0
- package/dist/src/type-compiler/go/typia_expr.go +2119 -0
- package/dist/src/type-compiler/index.cjs +6 -0
- package/dist/src/types/index.d.ts +7 -0
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/src/types/index.js +14 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/types/phone.d.ts +6 -0
- package/dist/src/types/phone.d.ts.map +1 -0
- package/dist/src/types/phone.js +64 -0
- package/dist/src/types/phone.js.map +1 -0
- package/dist/src/types/primitives.d.ts +33 -0
- package/dist/src/types/primitives.d.ts.map +1 -0
- package/dist/src/types/primitives.js +5 -0
- package/dist/src/types/primitives.js.map +1 -0
- package/dist/src/types/runtime.d.ts +5 -0
- package/dist/src/types/runtime.d.ts.map +1 -0
- package/dist/src/types/runtime.js +20 -0
- package/dist/src/types/runtime.js.map +1 -0
- package/dist/src/types/type-annotations.d.ts +28 -0
- package/dist/src/types/type-annotations.d.ts.map +1 -0
- package/dist/src/types/type-annotations.js +33 -0
- package/dist/src/types/type-annotations.js.map +1 -0
- package/dist/src/types.d.ts +2 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +7 -0
- package/dist/src/types.js.map +1 -0
- package/docs/.vitepress/config.mts +85 -0
- package/docs/content/CONTRIBUTING.md +53 -0
- package/docs/content/README-DEV.md +59 -0
- package/docs/content/README.md +52 -0
- package/docs/content/authentication.md +213 -0
- package/docs/content/cli.md +214 -0
- package/docs/content/configuration.md +191 -0
- package/docs/content/database.md +476 -0
- package/docs/content/devconsole.md +148 -0
- package/docs/content/di.md +212 -0
- package/docs/content/documentation-plan.md +182 -0
- package/docs/content/env.md +120 -0
- package/docs/content/getting-started.md +324 -0
- package/docs/content/health.md +64 -0
- package/docs/content/helpers.md +294 -0
- package/docs/content/http.md +402 -0
- package/docs/content/index.md +109 -0
- package/docs/content/leader-service.md +98 -0
- package/docs/content/logging.md +225 -0
- package/docs/content/mail.md +171 -0
- package/docs/content/mesh-client.md +333 -0
- package/docs/content/mesh-service.md +255 -0
- package/docs/content/migrations.md +190 -0
- package/docs/content/openapi.md +134 -0
- package/docs/content/overview.md +98 -0
- package/docs/content/public/images/devconsole/01-dashboard.png +0 -0
- package/docs/content/public/images/devconsole/02-routes.png +0 -0
- package/docs/content/public/images/devconsole/03-openapi.png +0 -0
- package/docs/content/public/images/devconsole/04-requests.png +0 -0
- package/docs/content/public/images/devconsole/05-srpc.png +0 -0
- package/docs/content/public/images/devconsole/06-database.png +0 -0
- package/docs/content/public/images/devconsole/06b-database-log.png +0 -0
- package/docs/content/public/images/devconsole/07-health.png +0 -0
- package/docs/content/public/images/devconsole/08-mutex.png +0 -0
- package/docs/content/public/images/devconsole/09-repl.png +0 -0
- package/docs/content/public/images/devconsole/10-workers.png +0 -0
- package/docs/content/public-api.md +84 -0
- package/docs/content/redis.md +174 -0
- package/docs/content/reflection.md +180 -0
- package/docs/content/release.md +100 -0
- package/docs/content/sql.md +121 -0
- package/docs/content/srpc.md +292 -0
- package/docs/content/telemetry.md +173 -0
- package/docs/content/testing.md +327 -0
- package/docs/content/type-reflection-architecture.md +149 -0
- package/docs/content/types.md +286 -0
- package/docs/content/uploads.md +145 -0
- package/docs/content/worker.md +182 -0
- package/docs/openapi.md +3 -0
- package/package.json +124 -0
- package/resources/proto/devconsole.proto +286 -0
- package/template-app/.env.development +10 -0
- package/template-app/gitignore.tmpl +11 -0
- package/template-app/package.json.tmpl +25 -0
- package/template-app/src/app.ts +13 -0
- package/template-app/src/config.ts +5 -0
- package/template-app/src/controllers/Example.controller.ts +19 -0
- package/template-app/src/database.ts +5 -0
- package/template-app/src/entities/Example.entity.ts +9 -0
- package/template-app/src/index.ts +7 -0
- package/template-app/src/migrations/.gitkeep +2 -0
- package/template-app/src/services/Example.service.ts +20 -0
- package/template-app/tests/app.spec.ts +8 -0
- package/template-app/tsconfig.json +26 -0
- package/template-app/tsconfig.test.json +5 -0
- package/types.d.ts +4 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-mapper.js","sourceRoot":"","sources":["../../../../../src/database/migration/create/type-mapper.ts"],"names":[],"mappings":";;;;;;AA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eAAe,CAAC,EAAE,QAAQ,EAAE,CAAC;IAEtE,OAAO;QACH,IAAI,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACpC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC3D,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC5D,QAAQ;KACX,CAAC;AACN,CAAC;AAED,uBAA8B,IAAY;IACtC,QAAQ,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;QACzB,KAAK,SAAS;YACV,OAAO,KAAK,CAAC;QACjB,KAAK,MAAM;YACP,OAAO,SAAS,CAAC;QACrB,KAAK,SAAS;YACV,OAAO,SAAS,CAAC;QACrB,KAAK,mBAAmB;YACpB,OAAO,SAAS,CAAC;QACrB,KAAK,6BAA6B,CAAC;QACnC,KAAK,0BAA0B;YAC3B,OAAO,WAAW,CAAC;QACvB,KAAK,kBAAkB;YACnB,OAAO,QAAQ,CAAC;QACpB;YACI,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;IAClC,CAAC;AACL,CAAC;AAED,SAAS,yBAAyB,CAAC,IAAU,EAAE,OAAgB;IAC3D,OAAO,CACH,+BAAkB,CAAC,WAAW,CAAoB,IAAI,EAAE,OAAO,CAAC,EAAE,IAAI,IAAI,+BAAkB,CAAC,WAAW,CAAoB,IAAI,EAAE,GAAG,CAAC,EAAE,IAAI,CAC/I,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { BaseDatabase } from '../database';
|
|
2
|
+
import { type LoggerInterface } from '../../services/logger';
|
|
3
|
+
export * from './create';
|
|
4
|
+
export * from './maintenance';
|
|
5
|
+
export type MigrationFunction<T extends BaseDatabase = BaseDatabase> = (db: T) => Promise<void> | void;
|
|
6
|
+
export interface Migration<T extends BaseDatabase = BaseDatabase> {
|
|
7
|
+
name: string;
|
|
8
|
+
up: MigrationFunction<T>;
|
|
9
|
+
}
|
|
10
|
+
export interface MigrationExecution {
|
|
11
|
+
name: string;
|
|
12
|
+
executedAt: Date;
|
|
13
|
+
durationMs: number;
|
|
14
|
+
}
|
|
15
|
+
export interface MigrationRunOptions<T extends BaseDatabase = BaseDatabase> {
|
|
16
|
+
beforeRun?: MigrationFunction<T>;
|
|
17
|
+
}
|
|
18
|
+
export declare function createMigration<T extends BaseDatabase>(fn: MigrationFunction<T>): MigrationFunction<T>;
|
|
19
|
+
export declare function defineMigration<T extends BaseDatabase>(name: string, up: MigrationFunction<T>): Migration<T>;
|
|
20
|
+
export declare class MigrationRunner<T extends BaseDatabase = BaseDatabase> {
|
|
21
|
+
readonly db: T;
|
|
22
|
+
readonly tableName: string;
|
|
23
|
+
private readonly logger;
|
|
24
|
+
constructor(db: T, tableName?: string, logger?: LoggerInterface);
|
|
25
|
+
run(migrations: readonly Migration<T>[], options?: MigrationRunOptions<T>): Promise<MigrationExecution[]>;
|
|
26
|
+
getExecutedMigrationNames(): Promise<string[]>;
|
|
27
|
+
createMigrationsTableIfNotExists(): Promise<void>;
|
|
28
|
+
private recordMigration;
|
|
29
|
+
}
|
|
30
|
+
export declare function runMigrations<T extends BaseDatabase>(db: T, migrations: readonly Migration<T>[], options?: MigrationRunOptions<T>): Promise<MigrationExecution[]>;
|
|
31
|
+
export declare function loadMigrationsFromDirectory<T extends BaseDatabase = BaseDatabase>(directory: string): Promise<Migration<T>[]>;
|
|
32
|
+
export declare function runMigrationsFromDirectory<T extends BaseDatabase>(db: T, directory: string): Promise<MigrationExecution[]>;
|
|
33
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":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A0C,EACnE;IAEE,GAAG,CAAC,UAAU,EAAE,SAAS,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,OAAO,GAAE,mBAAmB,CAAC,CAAC,CAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAqClH;IAEK,yBAAyB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAGnD;IAEK,gCAAgC,IAAI,OAAO,CAAC,IAAI,CAAC,CAoBtD;YAEa,eAAe;CAOhC;AAED,wBAAsB,aAAa,CAAC,CAAC,SAAS,YAAY,EACtD,EAAE,EAAE,CAAC,EACL,UAAU,EAAE,SAAS,SAAS,CAAC,CAAC,CAAC,EAAE,EACnC,OAAO,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC,GACjC,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAE/B;AAED,wBAAsB,2BAA2B,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAsBnI;AAkDD,wBAAsB,0BAA0B,CAAC,CAAC,SAAS,YAAY,EAAE,EAAE,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAEhI"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.__tsfTypeAliases = exports.MigrationRunner = void 0;
|
|
4
|
+
exports.createMigration = createMigration;
|
|
5
|
+
exports.defineMigration = defineMigration;
|
|
6
|
+
exports.runMigrations = runMigrations;
|
|
7
|
+
exports.loadMigrationsFromDirectory = loadMigrationsFromDirectory;
|
|
8
|
+
exports.runMigrationsFromDirectory = runMigrationsFromDirectory;
|
|
9
|
+
const tslib_1 = require("tslib");
|
|
10
|
+
const node_fs_1 = require("node:fs");
|
|
11
|
+
const node_path_1 = require("node:path");
|
|
12
|
+
const node_url_1 = require("node:url");
|
|
13
|
+
const sql_1 = require("../sql");
|
|
14
|
+
const logger_1 = require("../../services/logger");
|
|
15
|
+
tslib_1.__exportStar(require("./create"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./maintenance"), exports);
|
|
17
|
+
const dynamicImport = new Function('specifier', 'return import(specifier)');
|
|
18
|
+
function createMigration(fn) {
|
|
19
|
+
return fn;
|
|
20
|
+
}
|
|
21
|
+
function defineMigration(name, up) {
|
|
22
|
+
return { name, up };
|
|
23
|
+
}
|
|
24
|
+
let _MigrationRunnerMetadata_1;
|
|
25
|
+
class MigrationRunner {
|
|
26
|
+
db;
|
|
27
|
+
tableName;
|
|
28
|
+
logger;
|
|
29
|
+
constructor(db, tableName = '_migrations', logger = (0, logger_1.createLogger)('Migrator')) {
|
|
30
|
+
this.db = db;
|
|
31
|
+
this.tableName = tableName;
|
|
32
|
+
this.logger = logger;
|
|
33
|
+
}
|
|
34
|
+
async run(migrations, options = {}) {
|
|
35
|
+
return this.db.withConnection(async () => {
|
|
36
|
+
await options.beforeRun?.(this.db);
|
|
37
|
+
const ordered = [...migrations].sort((a, b) => a.name.localeCompare(b.name));
|
|
38
|
+
this.logger.info(`${ordered.length} migrations found in package`);
|
|
39
|
+
await this.createMigrationsTableIfNotExists();
|
|
40
|
+
const executedMigrationNames = await this.getExecutedMigrationNames();
|
|
41
|
+
const executed = new Set(executedMigrationNames);
|
|
42
|
+
const pending = ordered.filter(migration => !executed.has(migration.name));
|
|
43
|
+
const completed = [];
|
|
44
|
+
this.logger.info(`${executedMigrationNames.length} migrations previously executed`);
|
|
45
|
+
this.logger.info(`${pending.length} migrations to run`);
|
|
46
|
+
for (const migration of pending) {
|
|
47
|
+
const startedAt = Date.now();
|
|
48
|
+
this.logger.info(`Running migration: ${migration.name}`);
|
|
49
|
+
try {
|
|
50
|
+
await migration.up(this.db);
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
this.logger.error('Migration function failed to execute', error, { file: migration.name });
|
|
54
|
+
throw error;
|
|
55
|
+
}
|
|
56
|
+
const execution = {
|
|
57
|
+
name: migration.name,
|
|
58
|
+
executedAt: new Date(),
|
|
59
|
+
durationMs: Date.now() - startedAt
|
|
60
|
+
};
|
|
61
|
+
await this.recordMigration(execution);
|
|
62
|
+
completed.push(execution);
|
|
63
|
+
this.logger.info(`Completed migration: ${migration.name}`, {
|
|
64
|
+
durationMs: execution.durationMs
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return completed;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
async getExecutedMigrationNames() {
|
|
71
|
+
const rows = await this.db.rawFind((0, sql_1.sql) `SELECT ${sql_1.sql.identifier('name')} FROM ${sql_1.sql.identifier(this.tableName)}`);
|
|
72
|
+
return rows.map(row => String(row.name));
|
|
73
|
+
}
|
|
74
|
+
async createMigrationsTableIfNotExists() {
|
|
75
|
+
if (this.db.driver.dialect === 'postgres') {
|
|
76
|
+
await this.db.rawExecute((0, sql_1.sql) `
|
|
77
|
+
CREATE TABLE IF NOT EXISTS ${sql_1.sql.identifier(this.tableName)} (
|
|
78
|
+
${sql_1.sql.identifier('name')} varchar(255) NOT NULL PRIMARY KEY,
|
|
79
|
+
${sql_1.sql.identifier('executedAt')} timestamp NOT NULL,
|
|
80
|
+
${sql_1.sql.identifier('durationMs')} integer NOT NULL
|
|
81
|
+
)
|
|
82
|
+
`);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
await this.db.rawExecute((0, sql_1.sql) `
|
|
86
|
+
CREATE TABLE IF NOT EXISTS ${sql_1.sql.identifier(this.tableName)} (
|
|
87
|
+
${sql_1.sql.identifier('name')} varchar(255) NOT NULL,
|
|
88
|
+
${sql_1.sql.identifier('executedAt')} datetime NOT NULL,
|
|
89
|
+
${sql_1.sql.identifier('durationMs')} int unsigned NOT NULL,
|
|
90
|
+
PRIMARY KEY (${sql_1.sql.identifier('name')})
|
|
91
|
+
)
|
|
92
|
+
`);
|
|
93
|
+
}
|
|
94
|
+
async recordMigration(execution) {
|
|
95
|
+
await this.db.rawExecute((0, sql_1.sql) `INSERT INTO ${sql_1.sql.identifier(this.tableName)} (${sql_1.sql.identifier('name')}, ${sql_1.sql.identifier('executedAt')}, ${sql_1.sql.identifier('durationMs')}) VALUES (${execution.name}, ${execution.executedAt}, ${execution.durationMs})`);
|
|
96
|
+
}
|
|
97
|
+
static __tsfType = _MigrationRunnerMetadata_1 = ({ kind: 16, name: "MigrationRunner", typeName: "MigrationRunner", classType: () => MigrationRunner, properties: [], methods: [{ name: "run", parameters: [{ name: "migrations", type: { kind: 14, type: { kind: 16, typeName: "Migration", classType: () => (typeof Migration !== "undefined" ? Migration : (typeof exports !== "undefined" ? exports.Migration : undefined)), typeArguments: [{ kind: 2, typeName: "T" }] } }, optional: false, default: false }, { name: "options", type: { kind: 16, typeName: "MigrationRunOptions", classType: () => (typeof MigrationRunOptions !== "undefined" ? MigrationRunOptions : (typeof exports !== "undefined" ? exports.MigrationRunOptions : undefined)), typeArguments: [{ kind: 2, typeName: "T" }] }, optional: true, default: true }], returnType: { kind: 22, type: { kind: 14, type: { kind: 18, typeName: "MigrationExecution", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "executedAt", type: { kind: 16, typeName: "Date", classType: () => (typeof Date !== "undefined" ? Date : (typeof exports !== "undefined" ? exports.Date : undefined)) }, optional: false }, { kind: 20, name: "durationMs", type: { kind: 7 }, optional: false }] } } } }, { name: "getExecutedMigrationNames", parameters: [], returnType: { kind: 22, type: { kind: 14, type: { kind: 6 } } } }, { name: "createMigrationsTableIfNotExists", parameters: [], returnType: { kind: 22, type: { kind: 3 } } }], hasConstructor: true, constructorParameters: [{ name: "db", type: { kind: 2, typeName: "T" }, optional: false, default: false }, { name: "tableName", type: { kind: 2 }, optional: true, default: true }, { name: "logger", type: { kind: 16, typeName: "Logger", classType: () => (typeof Logger !== "undefined" ? Logger : (typeof exports !== "undefined" ? exports.Logger : undefined)), typeName: "LoggerInterface" }, optional: true, default: true }] });
|
|
98
|
+
}
|
|
99
|
+
exports.MigrationRunner = MigrationRunner;
|
|
100
|
+
_MigrationRunnerMetadata_1.classType = MigrationRunner;
|
|
101
|
+
MigrationRunner.__tsfType = _MigrationRunnerMetadata_1;
|
|
102
|
+
async function runMigrations(db, migrations, options) {
|
|
103
|
+
return new MigrationRunner(db).run(migrations, options);
|
|
104
|
+
}
|
|
105
|
+
async function loadMigrationsFromDirectory(directory) {
|
|
106
|
+
const migrationDirectory = resolveRunnableMigrationsDirectory(directory);
|
|
107
|
+
if (!migrationDirectory)
|
|
108
|
+
return [];
|
|
109
|
+
const files = (0, node_fs_1.readdirSync)(migrationDirectory)
|
|
110
|
+
.filter(file => /\.(c?js|mjs)$/.test(file))
|
|
111
|
+
.sort();
|
|
112
|
+
const migrations = [];
|
|
113
|
+
for (const file of files) {
|
|
114
|
+
const modulePath = (0, node_path_1.resolve)(migrationDirectory, file);
|
|
115
|
+
const loaded = await loadMigrationModule(modulePath);
|
|
116
|
+
const value = loaded.default ?? loaded.migration;
|
|
117
|
+
if (typeof value === 'function') {
|
|
118
|
+
migrations.push({ name: (0, node_path_1.basename)(file, (0, node_path_1.extname)(file)), up: value });
|
|
119
|
+
}
|
|
120
|
+
else if (value && typeof value === 'object' && typeof value.up === 'function') {
|
|
121
|
+
migrations.push({ ...value, name: value.name || (0, node_path_1.basename)(file, (0, node_path_1.extname)(file)) });
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
throw new Error(`Migration ${modulePath} must export a migration function as default`);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return migrations;
|
|
128
|
+
}
|
|
129
|
+
async function loadMigrationModule(modulePath) {
|
|
130
|
+
if ((0, node_path_1.extname)(modulePath) === '.mjs') {
|
|
131
|
+
return (await dynamicImport((0, node_url_1.pathToFileURL)(modulePath).href));
|
|
132
|
+
}
|
|
133
|
+
try {
|
|
134
|
+
return require(modulePath);
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
if (error.code !== 'ERR_REQUIRE_ESM')
|
|
138
|
+
throw error;
|
|
139
|
+
return (await dynamicImport((0, node_url_1.pathToFileURL)(modulePath).href));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function resolveRunnableMigrationsDirectory(directory) {
|
|
143
|
+
const absolute = (0, node_path_1.resolve)(directory);
|
|
144
|
+
if ((0, node_fs_1.existsSync)(absolute) && hasRunnableMigrationFiles(absolute))
|
|
145
|
+
return absolute;
|
|
146
|
+
const cwd = process.cwd();
|
|
147
|
+
const cwdRelative = (0, node_path_1.relative)(cwd, absolute);
|
|
148
|
+
if (cwdRelative === 'src' || cwdRelative.startsWith(`src${pathSeparator()}`)) {
|
|
149
|
+
const distDirectory = (0, node_path_1.resolve)(cwd, 'dist', cwdRelative);
|
|
150
|
+
if ((0, node_fs_1.existsSync)(distDirectory))
|
|
151
|
+
return distDirectory;
|
|
152
|
+
}
|
|
153
|
+
return (0, node_fs_1.existsSync)(absolute) ? absolute : undefined;
|
|
154
|
+
}
|
|
155
|
+
function hasRunnableMigrationFiles(directory) {
|
|
156
|
+
return (0, node_fs_1.readdirSync)(directory).some(file => /\.(c?js|mjs)$/.test(file));
|
|
157
|
+
}
|
|
158
|
+
function pathSeparator() {
|
|
159
|
+
return process.platform === 'win32' ? '\\' : '/';
|
|
160
|
+
}
|
|
161
|
+
async function runMigrationsFromDirectory(db, directory) {
|
|
162
|
+
return new MigrationRunner(db).run(await loadMigrationsFromDirectory(directory));
|
|
163
|
+
}
|
|
164
|
+
exports.__tsfTypeAliases = ({ "ColumnModification": { kind: 18, typeName: "ColumnModification", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "oldColumn", type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] }, optional: false }, { kind: 20, name: "newColumn", type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] }, optional: false }, { kind: 20, name: "typeChanged", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullableChanged", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultChanged", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrementChanged", type: { kind: 8 }, optional: false }] }, "ColumnSchema": { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] }, "CreateMigrationPlanOptions": { kind: 18, typeName: "CreateMigrationPlanOptions", types: [{ kind: 20, name: "pgSchema", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "tableNames", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }] }, "DatabaseSchema": { kind: 16, typeName: "Map", classType: () => (typeof Map !== "undefined" ? Map : (typeof exports !== "undefined" ? exports.Map : undefined)), typeArguments: [{ kind: 6 }, { kind: 18, typeName: "TableSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] } }, optional: false }, { kind: 20, name: "indexes", type: { kind: 14, type: { kind: 18, typeName: "IndexSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "unique", type: { kind: 8 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "columnSizes", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 7 }], index: { kind: 7 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "constraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "spatial", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "foreignKeys", type: { kind: 14, type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "primaryKeyColumns", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "primaryKeyConstraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }], typeName: "DatabaseSchema" }, "DdlContext": { kind: 18, typeName: "DdlContext", types: [{ kind: 20, name: "dialect", type: { kind: 12, types: [{ kind: 10, literal: "mysql" }, { kind: 10, literal: "postgres" }], typeName: "Dialect" }, optional: false }, { kind: 20, name: "pgSchema", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, "Dialect": { kind: 12, types: [{ kind: 10, literal: "mysql" }, { kind: 10, literal: "postgres" }], typeName: "Dialect" }, "ForeignKeyModification": { kind: 18, typeName: "ForeignKeyModification", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "oldForeignKey", type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, optional: false }, { kind: 20, name: "newForeignKey", type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, optional: false }] }, "ForeignKeySchema": { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, "IndexModification": { kind: 18, typeName: "IndexModification", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "oldIndex", type: { kind: 18, typeName: "IndexSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "unique", type: { kind: 8 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "columnSizes", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 7 }], index: { kind: 7 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "constraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "spatial", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }] }, optional: false }, { kind: 20, name: "newIndex", type: { kind: 18, typeName: "IndexSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "unique", type: { kind: 8 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "columnSizes", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 7 }], index: { kind: 7 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "constraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "spatial", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }] }, optional: false }] }, "IndexSchema": { kind: 18, typeName: "IndexSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "unique", type: { kind: 8 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "columnSizes", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 7 }], index: { kind: 7 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "constraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "spatial", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }] }, "Migration": { kind: 18, typeName: "Migration", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "up", type: { kind: 2, typeName: "MigrationFunction", typeArguments: [{ kind: 2, typeName: "T" }] }, optional: false }] }, "MigrationExecution": { kind: 18, typeName: "MigrationExecution", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "executedAt", type: { kind: 16, typeName: "Date", classType: () => (typeof Date !== "undefined" ? Date : (typeof exports !== "undefined" ? exports.Date : undefined)) }, optional: false }, { kind: 20, name: "durationMs", type: { kind: 7 }, optional: false }] }, "MigrationFileOptions": { kind: 18, typeName: "MigrationFileOptions", types: [{ kind: 20, name: "migrationsDir", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "now", type: { kind: 12, types: [{ kind: 16, typeName: "Date", classType: () => (typeof Date !== "undefined" ? Date : (typeof exports !== "undefined" ? exports.Date : undefined)) }, { kind: 4 }] }, optional: true }] }, "MigrationPlan": { kind: 18, typeName: "MigrationPlan", types: [{ kind: 20, name: "diff", type: { kind: 18, typeName: "SchemaDiff", types: [{ kind: 20, name: "dialect", type: { kind: 12, types: [{ kind: 10, literal: "mysql" }, { kind: 10, literal: "postgres" }], typeName: "Dialect" }, optional: false }, { kind: 20, name: "pgSchema", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "externalForeignKeyDrops", type: { kind: 14, type: { kind: 18, typeName: "TableForeignKeySchema", types: [{ kind: 20, name: "tableName", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignKey", type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, optional: false }] } }, optional: false }, { kind: 20, name: "externalForeignKeyAdds", type: { kind: 14, type: { kind: 18, typeName: "TableForeignKeySchema", types: [{ kind: 20, name: "tableName", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignKey", type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, optional: false }] } }, optional: false }, { kind: 20, name: "addedTables", type: { kind: 14, type: { kind: 18, typeName: "TableSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] } }, optional: false }, { kind: 20, name: "indexes", type: { kind: 14, type: { kind: 18, typeName: "IndexSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "unique", type: { kind: 8 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "columnSizes", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 7 }], index: { kind: 7 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "constraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "spatial", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "foreignKeys", type: { kind: 14, type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "primaryKeyColumns", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "primaryKeyConstraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "removedTables", type: { kind: 14, type: { kind: 18, typeName: "TableSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] } }, optional: false }, { kind: 20, name: "indexes", type: { kind: 14, type: { kind: 18, typeName: "IndexSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "unique", type: { kind: 8 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "columnSizes", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 7 }], index: { kind: 7 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "constraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "spatial", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "foreignKeys", type: { kind: 14, type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "primaryKeyColumns", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "primaryKeyConstraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "modifiedTables", type: { kind: 14, type: { kind: 18, typeName: "TableDiff", types: [{ kind: 20, name: "tableName", type: { kind: 6 }, optional: false }, { kind: 20, name: "addedColumns", type: { kind: 14, type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] } }, optional: false }, { kind: 20, name: "removedColumns", type: { kind: 14, type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] } }, optional: false }, { kind: 20, name: "modifiedColumns", type: { kind: 14, type: { kind: 18, typeName: "ColumnModification", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "oldColumn", type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] }, optional: false }, { kind: 20, name: "newColumn", type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] }, optional: false }, { kind: 20, name: "typeChanged", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullableChanged", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultChanged", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrementChanged", type: { kind: 8 }, optional: false }] } }, optional: false }, { kind: 20, name: "primaryKeyChanged", type: { kind: 8 }, optional: false }, { kind: 20, name: "oldPrimaryKey", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "newPrimaryKey", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "oldPrimaryKeyConstraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "oldAutoIncrementPrimaryKeyColumns", type: { kind: 14, type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] } }, optional: false }, { kind: 20, name: "newAutoIncrementColumns", type: { kind: 14, type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] } }, optional: false }, { kind: 20, name: "addedIndexes", type: { kind: 14, type: { kind: 18, typeName: "IndexSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "unique", type: { kind: 8 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "columnSizes", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 7 }], index: { kind: 7 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "constraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "spatial", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "removedIndexes", type: { kind: 14, type: { kind: 18, typeName: "IndexSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "unique", type: { kind: 8 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "columnSizes", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 7 }], index: { kind: 7 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "constraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "spatial", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "modifiedIndexes", type: { kind: 14, type: { kind: 18, typeName: "IndexModification", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "oldIndex", type: { kind: 18, typeName: "IndexSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "unique", type: { kind: 8 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "columnSizes", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 7 }], index: { kind: 7 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "constraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "spatial", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }] }, optional: false }, { kind: 20, name: "newIndex", type: { kind: 18, typeName: "IndexSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "unique", type: { kind: 8 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "columnSizes", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 7 }], index: { kind: 7 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "constraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "spatial", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }] }, optional: false }] } }, optional: false }, { kind: 20, name: "addedForeignKeys", type: { kind: 14, type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "removedForeignKeys", type: { kind: 14, type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "modifiedForeignKeys", type: { kind: 14, type: { kind: 18, typeName: "ForeignKeyModification", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "oldForeignKey", type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, optional: false }, { kind: 20, name: "newForeignKey", type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, optional: false }] } }, optional: false }, { kind: 20, name: "preservedForeignKeys", type: { kind: 14, type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] } }, optional: false }] } }, optional: false }] }, optional: false }, { kind: 20, name: "statements", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "hasChanges", type: { kind: 8 }, optional: false }] }, "MigrationRunOptions": { kind: 18, typeName: "MigrationRunOptions", types: [{ kind: 20, name: "beforeRun", type: { kind: 12, types: [{ kind: 2, typeName: "MigrationFunction", typeArguments: [{ kind: 2, typeName: "T" }] }, { kind: 4 }] }, optional: true }] }, "PostgresEnumRewriteGroup": { kind: 18, typeName: "PostgresEnumRewriteGroup", types: [{ kind: 20, name: "tableName", type: { kind: 6 }, optional: false }, { kind: 20, name: "typeName", type: { kind: 6 }, optional: false }, { kind: 20, name: "nextTypeName", type: { kind: 6 }, optional: false }, { kind: 20, name: "values", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 18, types: [{ kind: 20, name: "tableName", type: { kind: 6 }, optional: false }, { kind: 20, name: "columnName", type: { kind: 6 }, optional: false }] } }, optional: false }] }, "ReadDatabaseSchemaOptions": { kind: 18, typeName: "ReadDatabaseSchemaOptions", types: [{ kind: 20, name: "includeInternalTables", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }] }, "ReadEntitiesSchemaOptions": { kind: 18, typeName: "ReadEntitiesSchemaOptions", types: [{ kind: 20, name: "tableNames", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }] }, "ResetMigrationsOptions": { kind: 18, typeName: "ResetMigrationsOptions", types: [{ kind: 20, name: "migrationsDir", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "pgSchema", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, "ResetMigrationsResult": { kind: 18, typeName: "ResetMigrationsResult", types: [{ kind: 20, name: "migrationsDir", type: { kind: 6 }, optional: false }, { kind: 20, name: "removedFiles", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "tableCount", type: { kind: 7 }, optional: false }, { kind: 20, name: "statements", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "migrationPath", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, "SchemaDiff": { kind: 18, typeName: "SchemaDiff", types: [{ kind: 20, name: "dialect", type: { kind: 12, types: [{ kind: 10, literal: "mysql" }, { kind: 10, literal: "postgres" }], typeName: "Dialect" }, optional: false }, { kind: 20, name: "pgSchema", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "externalForeignKeyDrops", type: { kind: 14, type: { kind: 18, typeName: "TableForeignKeySchema", types: [{ kind: 20, name: "tableName", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignKey", type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, optional: false }] } }, optional: false }, { kind: 20, name: "externalForeignKeyAdds", type: { kind: 14, type: { kind: 18, typeName: "TableForeignKeySchema", types: [{ kind: 20, name: "tableName", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignKey", type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, optional: false }] } }, optional: false }, { kind: 20, name: "addedTables", type: { kind: 14, type: { kind: 18, typeName: "TableSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] } }, optional: false }, { kind: 20, name: "indexes", type: { kind: 14, type: { kind: 18, typeName: "IndexSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "unique", type: { kind: 8 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "columnSizes", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 7 }], index: { kind: 7 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "constraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "spatial", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "foreignKeys", type: { kind: 14, type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "primaryKeyColumns", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "primaryKeyConstraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "removedTables", type: { kind: 14, type: { kind: 18, typeName: "TableSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] } }, optional: false }, { kind: 20, name: "indexes", type: { kind: 14, type: { kind: 18, typeName: "IndexSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "unique", type: { kind: 8 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "columnSizes", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 7 }], index: { kind: 7 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "constraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "spatial", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "foreignKeys", type: { kind: 14, type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "primaryKeyColumns", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "primaryKeyConstraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "modifiedTables", type: { kind: 14, type: { kind: 18, typeName: "TableDiff", types: [{ kind: 20, name: "tableName", type: { kind: 6 }, optional: false }, { kind: 20, name: "addedColumns", type: { kind: 14, type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] } }, optional: false }, { kind: 20, name: "removedColumns", type: { kind: 14, type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] } }, optional: false }, { kind: 20, name: "modifiedColumns", type: { kind: 14, type: { kind: 18, typeName: "ColumnModification", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "oldColumn", type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] }, optional: false }, { kind: 20, name: "newColumn", type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] }, optional: false }, { kind: 20, name: "typeChanged", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullableChanged", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultChanged", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrementChanged", type: { kind: 8 }, optional: false }] } }, optional: false }, { kind: 20, name: "primaryKeyChanged", type: { kind: 8 }, optional: false }, { kind: 20, name: "oldPrimaryKey", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "newPrimaryKey", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "oldPrimaryKeyConstraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "oldAutoIncrementPrimaryKeyColumns", type: { kind: 14, type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] } }, optional: false }, { kind: 20, name: "newAutoIncrementColumns", type: { kind: 14, type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] } }, optional: false }, { kind: 20, name: "addedIndexes", type: { kind: 14, type: { kind: 18, typeName: "IndexSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "unique", type: { kind: 8 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "columnSizes", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 7 }], index: { kind: 7 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "constraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "spatial", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "removedIndexes", type: { kind: 14, type: { kind: 18, typeName: "IndexSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "unique", type: { kind: 8 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "columnSizes", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 7 }], index: { kind: 7 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "constraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "spatial", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "modifiedIndexes", type: { kind: 14, type: { kind: 18, typeName: "IndexModification", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "oldIndex", type: { kind: 18, typeName: "IndexSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "unique", type: { kind: 8 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "columnSizes", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 7 }], index: { kind: 7 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "constraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "spatial", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }] }, optional: false }, { kind: 20, name: "newIndex", type: { kind: 18, typeName: "IndexSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "unique", type: { kind: 8 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "columnSizes", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 7 }], index: { kind: 7 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "constraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "spatial", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }] }, optional: false }] } }, optional: false }, { kind: 20, name: "addedForeignKeys", type: { kind: 14, type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "removedForeignKeys", type: { kind: 14, type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "modifiedForeignKeys", type: { kind: 14, type: { kind: 18, typeName: "ForeignKeyModification", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "oldForeignKey", type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, optional: false }, { kind: 20, name: "newForeignKey", type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, optional: false }] } }, optional: false }, { kind: 20, name: "preservedForeignKeys", type: { kind: 14, type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] } }, optional: false }] } }, optional: false }] }, "StandardizeDbCollationOptions": { kind: 18, typeName: "StandardizeDbCollationOptions", types: [{ kind: 20, name: "charset", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "collation", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, "StandardizeDbCollationResult": { kind: 18, typeName: "StandardizeDbCollationResult", types: [{ kind: 20, name: "skipped", type: { kind: 8 }, optional: false }, { kind: 20, name: "databaseName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "tables", type: { kind: 14, type: { kind: 6 } }, optional: false }] }, "TableDiff": { kind: 18, typeName: "TableDiff", types: [{ kind: 20, name: "tableName", type: { kind: 6 }, optional: false }, { kind: 20, name: "addedColumns", type: { kind: 14, type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] } }, optional: false }, { kind: 20, name: "removedColumns", type: { kind: 14, type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] } }, optional: false }, { kind: 20, name: "modifiedColumns", type: { kind: 14, type: { kind: 18, typeName: "ColumnModification", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "oldColumn", type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] }, optional: false }, { kind: 20, name: "newColumn", type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] }, optional: false }, { kind: 20, name: "typeChanged", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullableChanged", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultChanged", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrementChanged", type: { kind: 8 }, optional: false }] } }, optional: false }, { kind: 20, name: "primaryKeyChanged", type: { kind: 8 }, optional: false }, { kind: 20, name: "oldPrimaryKey", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "newPrimaryKey", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "oldPrimaryKeyConstraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "oldAutoIncrementPrimaryKeyColumns", type: { kind: 14, type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] } }, optional: false }, { kind: 20, name: "newAutoIncrementColumns", type: { kind: 14, type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] } }, optional: false }, { kind: 20, name: "addedIndexes", type: { kind: 14, type: { kind: 18, typeName: "IndexSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "unique", type: { kind: 8 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "columnSizes", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 7 }], index: { kind: 7 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "constraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "spatial", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "removedIndexes", type: { kind: 14, type: { kind: 18, typeName: "IndexSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "unique", type: { kind: 8 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "columnSizes", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 7 }], index: { kind: 7 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "constraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "spatial", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "modifiedIndexes", type: { kind: 14, type: { kind: 18, typeName: "IndexModification", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "oldIndex", type: { kind: 18, typeName: "IndexSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "unique", type: { kind: 8 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "columnSizes", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 7 }], index: { kind: 7 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "constraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "spatial", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }] }, optional: false }, { kind: 20, name: "newIndex", type: { kind: 18, typeName: "IndexSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "unique", type: { kind: 8 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "columnSizes", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 7 }], index: { kind: 7 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "constraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "spatial", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }] }, optional: false }] } }, optional: false }, { kind: 20, name: "addedForeignKeys", type: { kind: 14, type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "removedForeignKeys", type: { kind: 14, type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "modifiedForeignKeys", type: { kind: 14, type: { kind: 18, typeName: "ForeignKeyModification", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "oldForeignKey", type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, optional: false }, { kind: 20, name: "newForeignKey", type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, optional: false }] } }, optional: false }, { kind: 20, name: "preservedForeignKeys", type: { kind: 14, type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] } }, optional: false }] }, "TableForeignKeySchema": { kind: 18, typeName: "TableForeignKeySchema", types: [{ kind: 20, name: "tableName", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignKey", type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, optional: false }] }, "TableSchema": { kind: 18, typeName: "TableSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 18, typeName: "ColumnSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "type", type: { kind: 6 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "scale", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "unsigned", type: { kind: 8 }, optional: false }, { kind: 20, name: "nullable", type: { kind: 8 }, optional: false }, { kind: 20, name: "autoIncrement", type: { kind: 8 }, optional: false }, { kind: 20, name: "primaryKey", type: { kind: 8 }, optional: false }, { kind: 20, name: "defaultValue", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 7 }, { kind: 8 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "defaultExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdateExpression", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumValues", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "enumTypeName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "afterColumn", type: { kind: 12, types: [{ kind: 12, types: [{ kind: 6 }, { kind: 5 }] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "ordinalPosition", type: { kind: 7 }, optional: false }] } }, optional: false }, { kind: 20, name: "indexes", type: { kind: 14, type: { kind: 18, typeName: "IndexSchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "columns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "unique", type: { kind: 8 }, optional: false }, { kind: 20, name: "size", type: { kind: 12, types: [{ kind: 7 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "columnSizes", type: { kind: 12, types: [{ kind: 18, typeName: "Record", utilityType: "Record", typeArguments: [{ kind: 6 }, { kind: 7 }], index: { kind: 7 }, types: [] }, { kind: 4 }] }, optional: true }, { kind: 20, name: "constraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "spatial", type: { kind: 12, types: [{ kind: 8 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "foreignKeys", type: { kind: 14, type: { kind: 18, typeName: "ForeignKeySchema", types: [{ kind: 20, name: "name", type: { kind: 6 }, optional: false }, { kind: 20, name: "localColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "foreignTable", type: { kind: 6 }, optional: false }, { kind: 20, name: "foreignColumns", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "onDelete", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "onUpdate", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] } }, optional: false }, { kind: 20, name: "primaryKeyColumns", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }, { kind: 20, name: "primaryKeyConstraintName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, "TableStatements": { kind: 18, typeName: "TableStatements", types: [{ kind: 20, name: "tableName", type: { kind: 6 }, optional: false }, { kind: 20, name: "statements", type: { kind: 14, type: { kind: 6 } }, optional: false }] } });
|
|
165
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/database/migration/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,qCAAkD;AAClD,yCAAiE;AACjE,uCAAyC;AAEzC,gCAA6B;AAE7B,kDAA2E;AAE3E,mDAAyB;AACzB,wDAA8B;AAmB9B,MAAM,aAAa,GAAG,IAAI,QAAQ,CAAC,WAAW,EAAE,0BAA0B,CAA4C,CAAC;AAEvH,yBAAwD,EAAwB;IAC5E,OAAO,EAAE,CAAC;AACd,CAAC;AAED,yBAAwD,IAAY,EAAE,EAAwB;IAC1F,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;AACxB,CAAC;;AAED;IAEiB,EAAE;IACF,SAAS;IACD,MAAM;IAH3B,YACa,EAAK,EACL,SAAS,GAAG,aAAa,EACjB,MAAM,GAAoB,IAAA,qBAAY,EAAC,UAAU,CAAC;kBAF1D,EAAE;yBACF,SAAS;sBACD,MAAM;IACxB,CAAC;IAEJ,KAAK,CAAC,GAAG,CAAC,UAAmC,EAAE,OAAO,GAA2B,EAAE;QAC/E,OAAO,IAAI,CAAC,EAAE,CAAC,cAAc,CAAC,KAAK,IAAI,EAAE;YACrC,MAAM,OAAO,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACnC,MAAM,OAAO,GAAG,CAAC,GAAG,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YAC7E,IAAI,CAAC,MAAM,CAAC,IA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';
|
|
2
|
+
export declare const DEFAULT_MYSQL_CHARSET = "utf8mb4";
|
|
3
|
+
export declare const DEFAULT_MYSQL_COLLATION = "utf8mb4_0900_ai_ci";
|
|
4
|
+
export interface ResetMigrationsOptions {
|
|
5
|
+
migrationsDir?: string;
|
|
6
|
+
pgSchema?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ResetMigrationsResult {
|
|
9
|
+
migrationsDir: string;
|
|
10
|
+
removedFiles: string[];
|
|
11
|
+
tableCount: number;
|
|
12
|
+
statements: string[];
|
|
13
|
+
migrationPath?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface StandardizeDbCollationOptions {
|
|
16
|
+
charset?: string;
|
|
17
|
+
collation?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface StandardizeDbCollationResult {
|
|
20
|
+
skipped: boolean;
|
|
21
|
+
databaseName?: string;
|
|
22
|
+
tables: string[];
|
|
23
|
+
}
|
|
24
|
+
export declare function resetMigrations(db: BaseDatabase, options?: ResetMigrationsOptions): Promise<ResetMigrationsResult>;
|
|
25
|
+
export declare function standardizeDbCollation(db: BaseDatabase, options?: StandardizeDbCollationOptions): Promise<StandardizeDbCollationResult>;
|
|
26
|
+
//# sourceMappingURL=maintenance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maintenance.d.ts","sourceRoot":"","sources":["../../../../src/database/migration/maintenance.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD,eAAO,MAAM,qBAAqB,YAAY,CAAC;AAC/C,eAAO,MAAM,uBAAuB,uBAAuB,CAAC;AAE5D,MAAM,WAAW,sBAAsB;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,qBAAqB;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,6BAA6B;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,4BAA4B;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,wBAAsB,eAAe,CAAC,EAAE,EAAE,YAAY,EAAE,OAAO,GAAE,sBAA2B,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA2B5H;AAED,wBAAsB,sBAAsB,CAAC,EAAE,EAAE,YAAY,EAAE,OAAO,GAAE,6BAAkC,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAyBjJ"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.__tsfTypeAliases = exports.DEFAULT_MYSQL_COLLATION = exports.DEFAULT_MYSQL_CHARSET = void 0;
|
|
4
|
+
exports.resetMigrations = resetMigrations;
|
|
5
|
+
exports.standardizeDbCollation = standardizeDbCollation;
|
|
6
|
+
const node_fs_1 = require("node:fs");
|
|
7
|
+
const node_path_1 = require("node:path");
|
|
8
|
+
const sql_1 = require("../sql");
|
|
9
|
+
const create_1 = require("./create");
|
|
10
|
+
const file_generator_1 = require("./create/file-generator");
|
|
11
|
+
exports.DEFAULT_MYSQL_CHARSET = 'utf8mb4';
|
|
12
|
+
exports.DEFAULT_MYSQL_COLLATION = 'utf8mb4_0900_ai_ci';
|
|
13
|
+
async function resetMigrations(db, options = {}) {
|
|
14
|
+
const migrationsDir = options.migrationsDir ?? (0, node_path_1.join)(process.cwd(), 'src', 'migrations');
|
|
15
|
+
if (!(0, node_fs_1.existsSync)(migrationsDir))
|
|
16
|
+
(0, node_fs_1.mkdirSync)(migrationsDir, { recursive: true });
|
|
17
|
+
const removedFiles = (0, node_fs_1.readdirSync)(migrationsDir)
|
|
18
|
+
.filter(file => file.endsWith('.ts'))
|
|
19
|
+
.sort();
|
|
20
|
+
for (const file of removedFiles)
|
|
21
|
+
(0, node_fs_1.unlinkSync)((0, node_path_1.join)(migrationsDir, file));
|
|
22
|
+
const tables = [...(0, create_1.readEntitiesSchema)(db).values()];
|
|
23
|
+
if (!tables.length) {
|
|
24
|
+
return { migrationsDir, removedFiles, tableCount: 0, statements: [] };
|
|
25
|
+
}
|
|
26
|
+
const diff = {
|
|
27
|
+
dialect: db.driver.dialect,
|
|
28
|
+
pgSchema: options.pgSchema,
|
|
29
|
+
externalForeignKeyDrops: [],
|
|
30
|
+
externalForeignKeyAdds: [],
|
|
31
|
+
addedTables: tables,
|
|
32
|
+
removedTables: [],
|
|
33
|
+
modifiedTables: []
|
|
34
|
+
};
|
|
35
|
+
const statements = (0, create_1.generateDDL)(diff);
|
|
36
|
+
const migrationPath = (0, node_path_1.join)(migrationsDir, '00000000_000000_base.ts');
|
|
37
|
+
(0, node_fs_1.writeFileSync)(migrationPath, (0, file_generator_1.buildMigrationFileContent)(statements), 'utf8');
|
|
38
|
+
return { migrationsDir, removedFiles, tableCount: tables.length, statements, migrationPath };
|
|
39
|
+
}
|
|
40
|
+
async function standardizeDbCollation(db, options = {}) {
|
|
41
|
+
if (db.driver.dialect === 'postgres') {
|
|
42
|
+
console.warn('Character set standardization is not applicable to PostgreSQL');
|
|
43
|
+
return { skipped: true, tables: [] };
|
|
44
|
+
}
|
|
45
|
+
const charset = assertSafeMySQLCharsetName(options.charset ?? exports.DEFAULT_MYSQL_CHARSET, 'charset');
|
|
46
|
+
const collation = assertSafeMySQLCharsetName(options.collation ?? exports.DEFAULT_MYSQL_COLLATION, 'collation');
|
|
47
|
+
const dbNameRow = await db.rawFindOne((0, sql_1.sql) `SELECT DATABASE() AS ${sql_1.sql.identifier('databaseName')}`);
|
|
48
|
+
const databaseName = String(dbNameRow?.databaseName ?? '');
|
|
49
|
+
if (!databaseName)
|
|
50
|
+
throw new Error('Could not determine current MySQL database');
|
|
51
|
+
await db.rawExecute((0, sql_1.sql) `ALTER DATABASE ${sql_1.sql.identifier(databaseName)} CHARACTER SET = ${sql_1.sql.rawTrusted(charset)} COLLATE = ${sql_1.sql.rawTrusted(collation)}`);
|
|
52
|
+
const tableRows = await db.rawFind((0, sql_1.sql) `SHOW TABLES`);
|
|
53
|
+
const tables = tableRows.map(row => Object.values(row)[0]).filter((value) => typeof value === 'string' && value.length > 0);
|
|
54
|
+
for (const table of tables) {
|
|
55
|
+
await db.rawExecute((0, sql_1.sql) `ALTER TABLE ${sql_1.sql.identifier(table)} CONVERT TO CHARACTER SET ${sql_1.sql.rawTrusted(charset)} COLLATE ${sql_1.sql.rawTrusted(collation)}`);
|
|
56
|
+
}
|
|
57
|
+
return { skipped: false, databaseName, tables };
|
|
58
|
+
}
|
|
59
|
+
function assertSafeMySQLCharsetName(value, field) {
|
|
60
|
+
if (!/^[A-Za-z0-9_]+$/.test(value))
|
|
61
|
+
throw new Error(`Invalid MySQL ${field}: ${value}`);
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
exports.__tsfTypeAliases = ({ "ResetMigrationsOptions": { kind: 18, typeName: "ResetMigrationsOptions", types: [{ kind: 20, name: "migrationsDir", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "pgSchema", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, "ResetMigrationsResult": { kind: 18, typeName: "ResetMigrationsResult", types: [{ kind: 20, name: "migrationsDir", type: { kind: 6 }, optional: false }, { kind: 20, name: "removedFiles", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "tableCount", type: { kind: 7 }, optional: false }, { kind: 20, name: "statements", type: { kind: 14, type: { kind: 6 } }, optional: false }, { kind: 20, name: "migrationPath", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, "StandardizeDbCollationOptions": { kind: 18, typeName: "StandardizeDbCollationOptions", types: [{ kind: 20, name: "charset", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "collation", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }] }, "StandardizeDbCollationResult": { kind: 18, typeName: "StandardizeDbCollationResult", types: [{ kind: 20, name: "skipped", type: { kind: 8 }, optional: false }, { kind: 20, name: "databaseName", type: { kind: 12, types: [{ kind: 6 }, { kind: 4 }] }, optional: true }, { kind: 20, name: "tables", type: { kind: 14, type: { kind: 6 } }, optional: false }] } });
|
|
65
|
+
//# sourceMappingURL=maintenance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maintenance.js","sourceRoot":"","sources":["../../../../src/database/migration/maintenance.ts"],"names":[],"mappings":";;;;;AAAA,qCAAwF;AACxF,yCAAiC;AAEjC,gCAA6B;AAE7B,qCAA4E;AAC5E,4DAAoE;AAEvD,QAAA,qBAAqB,GAAG,SAAS,CAAC;AAClC,QAAA,uBAAuB,GAAG,oBAAoB,CAAC;AA0BrD,KAAK,0BAA0B,EAAgB,EAAE,OAAO,GAA2B,EAAE;IACxF,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,IAAA,gBAAI,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC;IACxF,IAAI,CAAC,IAAA,oBAAU,EAAC,aAAa,CAAC;QAAE,IAAA,mBAAS,EAAC,aAAa,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE9E,MAAM,YAAY,GAAG,IAAA,qBAAW,EAAC,aAAa,CAAC;SAC1C,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;SACpC,IAAI,EAAE,CAAC;IACZ,KAAK,MAA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