@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,169 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.__tsfTypeAliases = void 0;
|
|
4
|
+
exports.readEntitiesSchema = readEntitiesSchema;
|
|
5
|
+
const reflection_1 = require("../../../reflection");
|
|
6
|
+
const identifiers_1 = require("../../identifiers");
|
|
7
|
+
const metadata_1 = require("../../metadata");
|
|
8
|
+
const type_mapper_1 = require("./type-mapper");
|
|
9
|
+
const schema_model_1 = require("./schema-model");
|
|
10
|
+
function readEntitiesSchema(db, options = {}) {
|
|
11
|
+
const schema = new Map();
|
|
12
|
+
const allowedTableNames = options.tableNames ? new Set(options.tableNames) : undefined;
|
|
13
|
+
for (const entity of db.entityRegistry) {
|
|
14
|
+
const reflection = reflection_1.ReflectionClass.from(entity);
|
|
15
|
+
if (reflection.isDatabaseMigrationSkipped(db.driver.dialect))
|
|
16
|
+
continue;
|
|
17
|
+
const tableName = getEntityTableName(entity);
|
|
18
|
+
if (shouldSkipEntityTable(tableName, allowedTableNames))
|
|
19
|
+
continue;
|
|
20
|
+
const metadata = (0, metadata_1.getEntityMetadata)(entity);
|
|
21
|
+
const defaultInstance = new entity();
|
|
22
|
+
const columnsByProperty = new Map(metadata.columns.map(column => [column.propertyName, column]));
|
|
23
|
+
const columnNameForProperty = (propertyName) => columnsByProperty.get(String(propertyName))?.columnName ?? String(propertyName);
|
|
24
|
+
const table = {
|
|
25
|
+
name: metadata.tableName,
|
|
26
|
+
columns: metadata.columns.map((column, index) => {
|
|
27
|
+
const property = reflection.getProperty(column.propertyName);
|
|
28
|
+
const isReference = property.isReference();
|
|
29
|
+
const defaultValue = defaultInstance[column.propertyName];
|
|
30
|
+
const type = isReference
|
|
31
|
+
? property.getResolvedReflectionClass().getPrimary().getType()
|
|
32
|
+
: typeWithDefaultInitializer(column.type, defaultValue);
|
|
33
|
+
const resolved = (0, type_mapper_1.resolveColumnType)(type, db.driver.dialect);
|
|
34
|
+
if (resolved.type === 'double' && (column.primaryKey || column.autoIncrement || isReference))
|
|
35
|
+
resolved.type = 'int';
|
|
36
|
+
const schema = {
|
|
37
|
+
name: column.columnName,
|
|
38
|
+
...resolved,
|
|
39
|
+
enumTypeName: db.driver.dialect === 'postgres' && resolved.type === 'enum' && resolved.enumValues?.length
|
|
40
|
+
? `${metadata.tableName}_${column.columnName}_enum`
|
|
41
|
+
: undefined,
|
|
42
|
+
unsigned: resolved.unsigned ?? false,
|
|
43
|
+
nullable: column.nullable,
|
|
44
|
+
autoIncrement: column.autoIncrement,
|
|
45
|
+
primaryKey: column.primaryKey,
|
|
46
|
+
ordinalPosition: index + 1
|
|
47
|
+
};
|
|
48
|
+
applyDefaultInitializer(schema, defaultValue, db.driver.dialect);
|
|
49
|
+
return schema;
|
|
50
|
+
}),
|
|
51
|
+
indexes: readEntityIndexes(metadata.tableName, reflection, columnNameForProperty, db.driver.dialect),
|
|
52
|
+
foreignKeys: readEntityForeignKeys(metadata.tableName, reflection, columnNameForProperty, db.driver.dialect),
|
|
53
|
+
primaryKeyColumns: metadata.columns.filter(column => column.primaryKey).map(column => column.columnName)
|
|
54
|
+
};
|
|
55
|
+
for (const foreignKey of table.foreignKeys)
|
|
56
|
+
ensureForeignKeyIndex(table.indexes, table.name, foreignKey.localColumns, db.driver.dialect);
|
|
57
|
+
schema.set(table.name, table);
|
|
58
|
+
}
|
|
59
|
+
return schema;
|
|
60
|
+
}
|
|
61
|
+
function shouldSkipEntityTable(tableName, allowedTableNames) {
|
|
62
|
+
if (allowedTableNames && !allowedTableNames.has(tableName))
|
|
63
|
+
return true;
|
|
64
|
+
return schema_model_1.INTERNAL_TABLES.has(tableName) && !allowedTableNames?.has(tableName);
|
|
65
|
+
}
|
|
66
|
+
function typeWithDefaultInitializer(type, value) {
|
|
67
|
+
if (type.kind !== reflection_1.ReflectionKind.unknown || value === undefined || value === null)
|
|
68
|
+
return type;
|
|
69
|
+
if (typeof value === 'string')
|
|
70
|
+
return { kind: reflection_1.ReflectionKind.string };
|
|
71
|
+
if (typeof value === 'number')
|
|
72
|
+
return { kind: reflection_1.ReflectionKind.number };
|
|
73
|
+
if (typeof value === 'boolean')
|
|
74
|
+
return { kind: reflection_1.ReflectionKind.boolean };
|
|
75
|
+
if (value instanceof Date)
|
|
76
|
+
return { kind: reflection_1.ReflectionKind.class, classType: Date };
|
|
77
|
+
return type;
|
|
78
|
+
}
|
|
79
|
+
function applyDefaultInitializer(column, value, dialect) {
|
|
80
|
+
if (column.autoIncrement || value === undefined || value === null)
|
|
81
|
+
return;
|
|
82
|
+
if (value instanceof Date) {
|
|
83
|
+
column.defaultExpression = 'CURRENT_TIMESTAMP';
|
|
84
|
+
}
|
|
85
|
+
else if (typeof value === 'boolean') {
|
|
86
|
+
column.defaultValue = dialect === 'mysql' ? (value ? '1' : '0') : value;
|
|
87
|
+
}
|
|
88
|
+
else if (typeof value === 'number' || typeof value === 'string') {
|
|
89
|
+
column.defaultValue = value;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function getEntityTableName(entity) {
|
|
93
|
+
const reflection = reflection_1.ReflectionClass.from(entity);
|
|
94
|
+
return reflection.getCollectionName() || reflection.name || entity.name;
|
|
95
|
+
}
|
|
96
|
+
function readEntityIndexes(tableName, reflection, columnNameForProperty, dialect) {
|
|
97
|
+
const indexes = [];
|
|
98
|
+
for (const index of reflection.indexes) {
|
|
99
|
+
const columns = index.names.map(columnNameForProperty);
|
|
100
|
+
if (!columns.length)
|
|
101
|
+
continue;
|
|
102
|
+
const unique = index.options.unique === true;
|
|
103
|
+
const schema = {
|
|
104
|
+
name: index.options.name || (0, identifiers_1.defaultEntityIndexName)(tableName, columns, dialect),
|
|
105
|
+
columns,
|
|
106
|
+
unique,
|
|
107
|
+
size: index.options.size
|
|
108
|
+
};
|
|
109
|
+
mergeOrPushIndex(indexes, schema);
|
|
110
|
+
}
|
|
111
|
+
return indexes;
|
|
112
|
+
}
|
|
113
|
+
function readEntityForeignKeys(tableName, reflection, columnNameForProperty, dialect) {
|
|
114
|
+
const foreignKeys = [];
|
|
115
|
+
for (const property of reflection.getProperties()) {
|
|
116
|
+
if (!property.isReference() || property.isDatabaseMigrationSkipped('*'))
|
|
117
|
+
continue;
|
|
118
|
+
const localColumn = columnNameForProperty(property.name);
|
|
119
|
+
const foreignReflection = property.getResolvedReflectionClass();
|
|
120
|
+
const foreignMetadata = (0, metadata_1.getEntityMetadata)(foreignReflection.getClassType());
|
|
121
|
+
const foreignColumns = foreignMetadata.columns.filter(column => column.primaryKey).map(column => column.columnName);
|
|
122
|
+
if (!foreignColumns.length)
|
|
123
|
+
continue;
|
|
124
|
+
const reference = property.getReference();
|
|
125
|
+
foreignKeys.push({
|
|
126
|
+
name: (0, identifiers_1.defaultEntityForeignKeyName)(tableName, [localColumn], dialect),
|
|
127
|
+
localColumns: [localColumn],
|
|
128
|
+
foreignTable: foreignMetadata.tableName,
|
|
129
|
+
foreignColumns,
|
|
130
|
+
onDelete: reference?.onDelete ?? 'CASCADE',
|
|
131
|
+
onUpdate: reference?.onUpdate ?? 'CASCADE'
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
return foreignKeys;
|
|
135
|
+
}
|
|
136
|
+
function ensureForeignKeyIndex(indexes, tableName, columns, dialect) {
|
|
137
|
+
if (indexes.some(index => startsWithColumns(index.columns, columns)))
|
|
138
|
+
return;
|
|
139
|
+
indexes.push({
|
|
140
|
+
name: (0, identifiers_1.defaultEntityIndexName)(tableName, columns, dialect),
|
|
141
|
+
columns,
|
|
142
|
+
unique: false
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
function startsWithColumns(indexColumns, columns) {
|
|
146
|
+
return columns.every((column, index) => indexColumns[index] === column);
|
|
147
|
+
}
|
|
148
|
+
function mergeOrPushIndex(indexes, schema) {
|
|
149
|
+
const sameName = indexes.find(existing => existing.name === schema.name);
|
|
150
|
+
if (sameName) {
|
|
151
|
+
if (arraysEqual(sameName.columns, schema.columns)) {
|
|
152
|
+
sameName.unique = sameName.unique || schema.unique;
|
|
153
|
+
sameName.size ??= schema.size;
|
|
154
|
+
}
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
if (!indexes.some(existing => sameIndexShape(existing, schema)))
|
|
158
|
+
indexes.push(schema);
|
|
159
|
+
}
|
|
160
|
+
function sameIndexShape(a, b) {
|
|
161
|
+
if (a.unique !== b.unique || !arraysEqual(a.columns, b.columns))
|
|
162
|
+
return false;
|
|
163
|
+
return a.columns.every(column => (a.columnSizes?.[column] ?? a.size) === (b.columnSizes?.[column] ?? b.size));
|
|
164
|
+
}
|
|
165
|
+
function arraysEqual(a, b) {
|
|
166
|
+
return a.length === b.length && a.every((value, index) => Object.is(value, b[index]));
|
|
167
|
+
}
|
|
168
|
+
exports.__tsfTypeAliases = ({ "ReadEntitiesSchemaOptions": { kind: 18, typeName: "ReadEntitiesSchemaOptions", types: [{ kind: 20, name: "tableNames", type: { kind: 12, types: [{ kind: 14, type: { kind: 6 } }, { kind: 4 }] }, optional: true }] } });
|
|
169
|
+
//# sourceMappingURL=entity-reader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-reader.js","sourceRoot":"","sources":["../../../../../src/database/migration/create/entity-reader.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface MigrationFileOptions {
|
|
2
|
+
migrationsDir?: string;
|
|
3
|
+
now?: Date;
|
|
4
|
+
}
|
|
5
|
+
export declare function buildMigrationFileContent(statements: readonly string[], packageName?: string): string;
|
|
6
|
+
export declare function writeMigrationFile(statements: readonly string[], description: string, options?: MigrationFileOptions): string;
|
|
7
|
+
//# sourceMappingURL=file-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-generator.d.ts","sourceRoot":"","sources":["../../../../../src/database/migration/create/file-generator.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,oBAAoB;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,GAAG,CAAC,EAAE,IAAI,CAAC;CACd;AAED,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,EAAE,WAAW,SAAkC,GAAG,MAAM,CAY9H;AAED,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,GAAE,oBAAyB,GAAG,MAAM,CAOjI"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.__tsfTypeAliases = void 0;
|
|
4
|
+
exports.buildMigrationFileContent = buildMigrationFileContent;
|
|
5
|
+
exports.writeMigrationFile = writeMigrationFile;
|
|
6
|
+
const node_fs_1 = require("node:fs");
|
|
7
|
+
const node_path_1 = require("node:path");
|
|
8
|
+
const ddl_generator_1 = require("./ddl-generator");
|
|
9
|
+
function buildMigrationFileContent(statements, packageName = '@zyno-io/ts-server-foundation') {
|
|
10
|
+
const lines = [];
|
|
11
|
+
for (const statement of statements) {
|
|
12
|
+
if (statement.startsWith(ddl_generator_1.COMMENT_PREFIX)) {
|
|
13
|
+
lines.push('');
|
|
14
|
+
lines.push(` // Table: ${statement.slice(ddl_generator_1.COMMENT_PREFIX.length)}`);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
lines.push(formatStatement(statement));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return `import { createMigration } from '${packageName}';\n\nexport default createMigration(async db => {${lines.join('\n')}\n});\n`;
|
|
21
|
+
}
|
|
22
|
+
function writeMigrationFile(statements, description, options = {}) {
|
|
23
|
+
const migrationsDir = options.migrationsDir ?? (0, node_path_1.join)(process.cwd(), 'src', 'migrations');
|
|
24
|
+
if (!(0, node_fs_1.existsSync)(migrationsDir))
|
|
25
|
+
(0, node_fs_1.mkdirSync)(migrationsDir, { recursive: true });
|
|
26
|
+
const filename = `${timestamp(options.now ?? new Date())}_${slugify(description)}.ts`;
|
|
27
|
+
const path = (0, node_path_1.join)(migrationsDir, filename);
|
|
28
|
+
(0, node_fs_1.writeFileSync)(path, buildMigrationFileContent(statements), 'utf8');
|
|
29
|
+
return path;
|
|
30
|
+
}
|
|
31
|
+
function formatStatement(statement) {
|
|
32
|
+
const escaped = statement.replace(/\\/g, '\\\\').replace(/`/g, '\\`').replace(/\$/g, '\\$');
|
|
33
|
+
if (!escaped.includes('\n'))
|
|
34
|
+
return ` await db.rawExecute(\`${escaped}\`);`;
|
|
35
|
+
return ` await db.rawExecute(\`\n${escaped
|
|
36
|
+
.split('\n')
|
|
37
|
+
.map(line => ` ${line}`)
|
|
38
|
+
.join('\n')}\n \`);`;
|
|
39
|
+
}
|
|
40
|
+
function timestamp(date) {
|
|
41
|
+
const parts = [
|
|
42
|
+
date.getUTCFullYear(),
|
|
43
|
+
date.getUTCMonth() + 1,
|
|
44
|
+
date.getUTCDate(),
|
|
45
|
+
date.getUTCHours(),
|
|
46
|
+
date.getUTCMinutes(),
|
|
47
|
+
date.getUTCSeconds()
|
|
48
|
+
].map((part, index) => (index === 0 ? String(part) : String(part).padStart(2, '0')));
|
|
49
|
+
return `${parts[0]}${parts[1]}${parts[2]}_${parts[3]}${parts[4]}${parts[5]}`;
|
|
50
|
+
}
|
|
51
|
+
function slugify(description) {
|
|
52
|
+
const slug = description
|
|
53
|
+
.toLowerCase()
|
|
54
|
+
.replace(/[^a-z0-9]+/g, '_')
|
|
55
|
+
.replace(/^_|_$/g, '')
|
|
56
|
+
.slice(0, 50);
|
|
57
|
+
return slug || 'migration';
|
|
58
|
+
}
|
|
59
|
+
exports.__tsfTypeAliases = ({ "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 }] } });
|
|
60
|
+
//# sourceMappingURL=file-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-generator.js","sourceRoot":"","sources":["../../../../../src/database/migration/create/file-generator.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { BaseDatabase } from '../../database';
|
|
2
|
+
import { type SchemaDiff } from './schema-model';
|
|
3
|
+
export interface CreateMigrationPlanOptions {
|
|
4
|
+
pgSchema?: string;
|
|
5
|
+
tableNames?: readonly string[];
|
|
6
|
+
}
|
|
7
|
+
export interface MigrationPlan {
|
|
8
|
+
diff: SchemaDiff;
|
|
9
|
+
statements: string[];
|
|
10
|
+
hasChanges: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function createMigrationPlan(db: BaseDatabase, options?: CreateMigrationPlanOptions): Promise<MigrationPlan>;
|
|
13
|
+
export * from './schema-model';
|
|
14
|
+
export * from './entity-reader';
|
|
15
|
+
export * from './db-reader';
|
|
16
|
+
export * from './comparator';
|
|
17
|
+
export * from './ddl-generator';
|
|
18
|
+
export * from './file-generator';
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/database/migration/create/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAKnD,OAAO,EAA2C,KAAK,UAAU,EAAoB,MAAM,gBAAgB,CAAC;AAE5G,MAAM,WAAW,0BAA0B;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;CACvB;AAED,wBAAsB,mBAAmB,CAAC,EAAE,EAAE,YAAY,EAAE,OAAO,GAAE,0BAA+B,GAAG,OAAO,CAAC,aAAa,CAAC,CAe5H;AAoFD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.__tsfTypeAliases = void 0;
|
|
4
|
+
exports.createMigrationPlan = createMigrationPlan;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const comparator_1 = require("./comparator");
|
|
7
|
+
const db_reader_1 = require("./db-reader");
|
|
8
|
+
const ddl_generator_1 = require("./ddl-generator");
|
|
9
|
+
const entity_reader_1 = require("./entity-reader");
|
|
10
|
+
const schema_model_1 = require("./schema-model");
|
|
11
|
+
async function createMigrationPlan(db, options = {}) {
|
|
12
|
+
const scopedTableNames = options.tableNames ? [...new Set(options.tableNames)] : undefined;
|
|
13
|
+
const entitySchema = (0, entity_reader_1.readEntitiesSchema)(db, { tableNames: scopedTableNames });
|
|
14
|
+
const entityTableNames = [...entitySchema.keys()];
|
|
15
|
+
const dbTableNames = scopedTableNames ?? (await (0, db_reader_1.readAllTableNames)(db, options.pgSchema));
|
|
16
|
+
const tableNames = scopedTableNames ?? [...new Set([...entityTableNames, ...dbTableNames])];
|
|
17
|
+
const dbSchema = await (0, db_reader_1.readDatabaseSchema)(db, tableNames, options.pgSchema, { includeInternalTables: scopedTableNames !== undefined });
|
|
18
|
+
const diff = (0, comparator_1.compareSchemas)(entitySchema, dbSchema, db.driver.dialect, options.pgSchema);
|
|
19
|
+
await addExternalForeignKeyChanges(diff, entitySchema, scopedTableNames, db, options.pgSchema);
|
|
20
|
+
const statements = (0, ddl_generator_1.generateDDL)(diff);
|
|
21
|
+
return {
|
|
22
|
+
diff,
|
|
23
|
+
statements,
|
|
24
|
+
hasChanges: (0, schema_model_1.hasSchemaChanges)(diff)
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
async function addExternalForeignKeyChanges(diff, entitySchema, scopedTableNames, db, pgSchema) {
|
|
28
|
+
const scopedTables = scopedTableNames ? new Set(scopedTableNames) : undefined;
|
|
29
|
+
const removedTables = new Set(diff.removedTables.map(table => table.name));
|
|
30
|
+
const affectedColumnsByTable = new Map();
|
|
31
|
+
for (const table of diff.removedTables)
|
|
32
|
+
affectedColumnsByTable.set(table.name, new Set(['*']));
|
|
33
|
+
for (const table of diff.modifiedTables) {
|
|
34
|
+
const affectedColumns = getExternallyReferencedAffectedColumns(table);
|
|
35
|
+
if (affectedColumns.size)
|
|
36
|
+
affectedColumnsByTable.set(table.tableName, affectedColumns);
|
|
37
|
+
}
|
|
38
|
+
if (!affectedColumnsByTable.size)
|
|
39
|
+
return;
|
|
40
|
+
const inboundForeignKeys = await (0, db_reader_1.readInboundForeignKeys)(db, [...affectedColumnsByTable.keys()], pgSchema);
|
|
41
|
+
diff.externalForeignKeyDrops = inboundForeignKeys.filter(tableForeignKey => {
|
|
42
|
+
const affectedColumns = affectedColumnsByTable.get(tableForeignKey.foreignKey.foreignTable);
|
|
43
|
+
return affectedColumns?.has('*') || tableForeignKey.foreignKey.foreignColumns.some(column => affectedColumns?.has(column));
|
|
44
|
+
});
|
|
45
|
+
diff.externalForeignKeyAdds = diff.externalForeignKeyDrops.filter(tableForeignKey => {
|
|
46
|
+
if (removedTables.has(tableForeignKey.foreignKey.foreignTable) || removedTables.has(tableForeignKey.tableName))
|
|
47
|
+
return false;
|
|
48
|
+
if (scopedTables?.has(tableForeignKey.tableName))
|
|
49
|
+
return false;
|
|
50
|
+
if (!scopedTables && tableDiffHandlesForeignKey(diff, tableForeignKey.tableName, tableForeignKey.foreignKey))
|
|
51
|
+
return false;
|
|
52
|
+
const referencedTable = entitySchema.get(tableForeignKey.foreignKey.foreignTable);
|
|
53
|
+
if (!referencedTable)
|
|
54
|
+
return false;
|
|
55
|
+
const remainingColumns = new Set(referencedTable.columns.map(column => column.name));
|
|
56
|
+
if (!tableForeignKey.foreignKey.foreignColumns.every(column => remainingColumns.has(column)))
|
|
57
|
+
return false;
|
|
58
|
+
if (scopedTables)
|
|
59
|
+
return true;
|
|
60
|
+
const owningTable = entitySchema.get(tableForeignKey.tableName);
|
|
61
|
+
return !!owningTable && tableHasMatchingForeignKey(owningTable, tableForeignKey.foreignKey);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function getExternallyReferencedAffectedColumns(table) {
|
|
65
|
+
return new Set([
|
|
66
|
+
...table.removedColumns.map(column => column.name),
|
|
67
|
+
...table.modifiedColumns.map(column => column.name),
|
|
68
|
+
...(table.primaryKeyChanged ? [...table.oldPrimaryKey, ...table.newPrimaryKey] : [])
|
|
69
|
+
]);
|
|
70
|
+
}
|
|
71
|
+
function tableDiffHandlesForeignKey(diff, tableName, foreignKey) {
|
|
72
|
+
const table = diff.modifiedTables.find(item => item.tableName === tableName);
|
|
73
|
+
if (!table)
|
|
74
|
+
return false;
|
|
75
|
+
return (table.removedForeignKeys.some(item => foreignKeysMatchIdentity(item, foreignKey)) ||
|
|
76
|
+
table.modifiedForeignKeys.some(modification => foreignKeysMatchIdentity(modification.oldForeignKey, foreignKey) || foreignKeysMatchIdentity(modification.newForeignKey, foreignKey)) ||
|
|
77
|
+
table.preservedForeignKeys.some(item => foreignKeysMatchIdentity(item, foreignKey)));
|
|
78
|
+
}
|
|
79
|
+
function tableHasMatchingForeignKey(table, foreignKey) {
|
|
80
|
+
return table.foreignKeys.some(candidate => foreignKeysMatchIdentity(candidate, foreignKey));
|
|
81
|
+
}
|
|
82
|
+
function foreignKeysMatchIdentity(a, b) {
|
|
83
|
+
return (arraysEqual(a.localColumns, b.localColumns) &&
|
|
84
|
+
a.foreignTable === b.foreignTable &&
|
|
85
|
+
arraysEqual(a.foreignColumns, b.foreignColumns) &&
|
|
86
|
+
normalizeAction(a.onDelete) === normalizeAction(b.onDelete) &&
|
|
87
|
+
normalizeAction(a.onUpdate) === normalizeAction(b.onUpdate));
|
|
88
|
+
}
|
|
89
|
+
function normalizeAction(action) {
|
|
90
|
+
return (action || 'CASCADE').toUpperCase();
|
|
91
|
+
}
|
|
92
|
+
function arraysEqual(a, b) {
|
|
93
|
+
return a.length === b.length && a.every((value, index) => Object.is(value, b[index]));
|
|
94
|
+
}
|
|
95
|
+
tslib_1.__exportStar(require("./schema-model"), exports);
|
|
96
|
+
tslib_1.__exportStar(require("./entity-reader"), exports);
|
|
97
|
+
tslib_1.__exportStar(require("./db-reader"), exports);
|
|
98
|
+
tslib_1.__exportStar(require("./comparator"), exports);
|
|
99
|
+
tslib_1.__exportStar(require("./ddl-generator"), exports);
|
|
100
|
+
tslib_1.__exportStar(require("./file-generator"), exports);
|
|
101
|
+
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 }] }, "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 }] }, "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 }] }, "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 }] }, "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 }] } });
|
|
102
|
+
//# sourceMappingURL=index.js.map
|