├── .env.test.example ├── .eslintignore ├── .eslintrc.js ├── .github └── workflows │ ├── codeql-analysis.yml │ ├── main.yml │ └── staging.yml ├── .gitignore ├── .npmignore ├── .prettierrc ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── SECURITY.md ├── changelog.config.js ├── package.json ├── src ├── cli.ts ├── errors │ ├── CircularMigrationError.ts │ ├── DeletedReferenceError.ts │ ├── DuplicateMigrationError.ts │ ├── DuplicateResourceError.ts │ ├── EmptyResourceFileError.ts │ ├── ErrorWithFilePath.ts │ ├── EvalFqlError.ts │ ├── ExpectedNumber.ts │ ├── TriedChangingMissingCloudResourceError.ts │ ├── TriedDeletingMissingCloudResourceError.ts │ ├── UndefinedReferenceError.ts │ ├── UpdateIndexError.ts │ ├── WrongCreateTypeError.ts │ ├── WrongResourceTypeError.ts │ └── detect-errors.ts ├── fql │ ├── eval.ts │ ├── json.ts │ ├── match.ts │ ├── print.ts │ └── transform.ts ├── index.ts ├── interactive-shell │ ├── colors.ts │ ├── interactive-shell.tsx │ └── shell.ts ├── migrations │ ├── advance.ts │ ├── diff.ts │ ├── generate-migration.ts │ ├── generate-query.ts │ ├── plan.ts │ └── rollback.ts ├── state │ ├── from-cloud.ts │ ├── from-code.ts │ ├── from-migration-files.ts │ └── from-resource-files.ts ├── tasks.ts ├── tasks │ ├── _copy.ts │ ├── _new.ts │ ├── _plan.ts │ ├── _validate.ts │ ├── apply.ts │ ├── init.ts │ ├── migrate.ts │ ├── rollback.ts │ ├── run.ts │ └── state.ts ├── templates │ ├── functions-onefile.template.js │ └── functions-perfile.template.js ├── types │ ├── clients.ts │ ├── expressions.ts │ ├── migrations.ts │ ├── patterns.ts │ └── resource-types.ts └── util │ ├── config.ts │ ├── defaults.ts │ ├── fauna-client.ts │ ├── files.ts │ └── unique-naming.ts ├── tests ├── _helpers.ts ├── api │ ├── 1a-load-from-strings.ts │ ├── 1b-load-from-code.ts │ ├── 1c-load-from-path.ts │ ├── 2-diff-from-code.ts │ ├── 3-generate-migrations-from-code.ts │ ├── 4-generate-let-body-from-code.ts │ ├── 5-generate-apply-query-from-code.ts │ ├── 6-generate-rollback-query-from-code.ts │ ├── resourcesFQL │ │ └── accounts.fql │ ├── resourcesJS │ │ └── accounts.js │ └── resourcesTS │ │ └── _accounts.ts ├── dependencies │ ├── circular_dependencies │ │ ├── resources │ │ │ ├── create_collection1.fql │ │ │ └── create_collection2.fql │ │ └── test.ts │ ├── circular_updates │ │ ├── resources1 │ │ │ ├── create_collection1.fql │ │ │ └── create_collection2.fql │ │ ├── resources2 │ │ │ ├── update_collection1.fql │ │ │ └── update_collection2.fql │ │ └── test.ts │ ├── deleted_dependencies │ │ ├── resources1 │ │ │ ├── create_collection1.fql │ │ │ └── create_function1.fql │ │ ├── resources2 │ │ │ └── create_collection1.fql │ │ └── test.ts │ ├── duplicate_naming │ │ ├── resources │ │ │ ├── create_collection1.fql │ │ │ └── create_collection1_again.fql │ │ └── test.ts │ ├── fake_dependencies │ │ ├── resources │ │ │ └── create_function.fql │ │ └── test.ts │ ├── undefined_dependencies │ │ ├── resources1 │ │ │ └── create_collection1.fql │ │ ├── resources2 │ │ │ └── create_collection1.fql │ │ └── test.ts │ └── working_dependencies │ │ ├── resources │ │ ├── create_accessprovider1.fql │ │ ├── create_collection1.fql │ │ ├── create_collection2.fql │ │ ├── create_index1.fql │ │ ├── create_index2.fql │ │ ├── create_role1.fql │ │ ├── create_role2.fql │ │ └── create_udf1.fql │ │ └── test.ts ├── general │ ├── disallow_non_create │ │ ├── resources │ │ │ └── update_role.fql │ │ └── test.ts │ └── multi_update_noop │ │ ├── resources1 │ │ ├── create_collection.fql │ │ ├── create_function.js │ │ ├── create_index.fql │ │ └── create_role.fql │ │ ├── resources2 │ │ ├── create_collection.fql │ │ ├── create_function.js │ │ ├── create_index.fql │ │ └── create_role.fql │ │ ├── resources3 │ │ ├── create_collection.fql │ │ ├── create_function.js │ │ ├── create_index.fql │ │ └── create_role.fql │ │ └── test.ts ├── multi_apply │ ├── resources1 │ │ ├── create_collection1.fql │ │ ├── create_collection2.fql │ │ └── create_collection3.fql │ ├── resources2 │ │ ├── create_collection1.fql │ │ └── create_collection3.fql │ ├── resources3 │ │ ├── create_collection1.fql │ │ └── create_collection4.fql │ ├── resources4 │ │ ├── create_collection1.fql │ │ ├── create_collection4.fql │ │ └── create_collection5.fql │ └── test.ts ├── multi_db │ ├── create_child_dbs │ │ └── test.ts │ ├── rollback_child_dbs │ │ ├── resources1 │ │ │ └── dbs │ │ │ │ ├── child1 │ │ │ │ └── dbs │ │ │ │ │ └── child1a │ │ │ │ │ └── create_collection.fql │ │ │ │ └── child2 │ │ │ │ └── create_collection.fql │ │ ├── resources2 │ │ │ └── dbs │ │ │ │ ├── child1 │ │ │ │ └── dbs │ │ │ │ │ └── child1a │ │ │ │ │ ├── create_collection.fql │ │ │ │ │ └── create_function.fql │ │ │ │ └── child2 │ │ │ │ └── create_function.fql │ │ └── test.ts │ ├── update_child_db_content │ │ ├── resources1 │ │ │ └── dbs │ │ │ │ ├── child1 │ │ │ │ └── dbs │ │ │ │ │ └── child1a │ │ │ │ │ └── create_collection.fql │ │ │ │ └── child2 │ │ │ │ └── create_collection.fql │ │ ├── resources2 │ │ │ └── dbs │ │ │ │ ├── child1 │ │ │ │ └── dbs │ │ │ │ │ └── child1a │ │ │ │ │ ├── create_collection.fql │ │ │ │ │ └── create_function.fql │ │ │ │ └── child2 │ │ │ │ └── create_function.fql │ │ └── test.ts │ └── update_child_dbs │ │ └── test.ts ├── rollbacks │ └── separate_rollbacks │ │ ├── resources1 │ │ ├── create_collection1.fql │ │ ├── create_collection2.fql │ │ └── create_collection3.fql │ │ ├── resources2 │ │ ├── create_collection1.fql │ │ └── create_collection3.fql │ │ ├── resources3 │ │ ├── create_collection1.fql │ │ └── create_collection4.fql │ │ ├── resources4 │ │ ├── create_collection1.fql │ │ ├── create_collection4.fql │ │ └── create_collection5.fql │ │ └── test.ts ├── single_apply │ ├── README.md │ ├── accessproviders │ │ ├── create_ap │ │ │ ├── resources │ │ │ │ └── create_ap.fql │ │ │ └── test.ts │ │ ├── delete_ap │ │ │ ├── resources1 │ │ │ │ └── create_ap.fql │ │ │ └── test.ts │ │ └── update_ap │ │ │ ├── resources1 │ │ │ └── create_ap.fql │ │ │ ├── resources2 │ │ │ ├── create_ap.fql │ │ │ └── create_role.fql │ │ │ └── test.ts │ ├── collections │ │ ├── create_collection │ │ │ ├── resources │ │ │ │ └── create_collection.fql │ │ │ └── test.ts │ │ ├── delete_collection │ │ │ ├── resources1 │ │ │ │ └── create_collection.fql │ │ │ └── test.ts │ │ └── update_collection │ │ │ ├── resources1 │ │ │ └── create_collection.fql │ │ │ ├── resources2 │ │ │ └── create_collection.fql │ │ │ └── test.ts │ ├── functions │ │ ├── create_function │ │ │ ├── resources │ │ │ │ └── create_function.fql │ │ │ └── test.ts │ │ ├── delete_function │ │ │ ├── resources1 │ │ │ │ └── create_function.fql │ │ │ └── test.ts │ │ └── update_function │ │ │ ├── resources1 │ │ │ └── create_function.fql │ │ │ ├── resources2 │ │ │ └── create_function.fql │ │ │ └── test.ts │ ├── indices │ │ ├── create_index │ │ │ ├── resources │ │ │ │ ├── create_collection.fql │ │ │ │ └── create_index.fql │ │ │ └── test.ts │ │ ├── delete_index │ │ │ ├── resources1 │ │ │ │ ├── create_collection.fql │ │ │ │ └── create_index.fql │ │ │ ├── resources2 │ │ │ │ └── create_collection.fql │ │ │ └── test.ts │ │ └── update_index │ │ │ ├── resources1 │ │ │ ├── create_collection.fql │ │ │ └── create_index.fql │ │ │ ├── resources2 │ │ │ ├── create_collection.fql │ │ │ └── create_index.fql │ │ │ └── test.ts │ └── roles │ │ ├── create_role │ │ ├── resources │ │ │ └── create_role.fql │ │ └── test.ts │ │ ├── delete_role │ │ ├── resources1 │ │ │ └── create_role.fql │ │ └── test.ts │ │ └── update_role │ │ ├── resources1 │ │ └── create_role.fql │ │ ├── resources2 │ │ ├── create_collection.fql │ │ └── create_role.fql │ │ └── test.ts └── sources │ ├── resourcesFQL │ └── accounts.fql │ ├── resourcesJS │ └── accounts.js │ ├── resourcesTS │ └── _accounts.ts │ └── test.ts └── tsconfig.json /.env.test.example: -------------------------------------------------------------------------------- 1 | FAUNA_ADMIN_KEY= -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | templates/ -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/.eslintrc.js -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/.github/workflows/codeql-analysis.yml -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/.github/workflows/main.yml -------------------------------------------------------------------------------- /.github/workflows/staging.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/.github/workflows/staging.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/.gitignore -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # Copyright Fauna, Inc. 2 | # SPDX-License-Identifier: MIT-0 3 | 4 | tsconfig.json 5 | src -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/.prettierrc -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | #### 2.2.0 (2021-11-12) 2 | 3 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/README.md -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/SECURITY.md -------------------------------------------------------------------------------- /changelog.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/changelog.config.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/package.json -------------------------------------------------------------------------------- /src/cli.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/cli.ts -------------------------------------------------------------------------------- /src/errors/CircularMigrationError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/errors/CircularMigrationError.ts -------------------------------------------------------------------------------- /src/errors/DeletedReferenceError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/errors/DeletedReferenceError.ts -------------------------------------------------------------------------------- /src/errors/DuplicateMigrationError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/errors/DuplicateMigrationError.ts -------------------------------------------------------------------------------- /src/errors/DuplicateResourceError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/errors/DuplicateResourceError.ts -------------------------------------------------------------------------------- /src/errors/EmptyResourceFileError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/errors/EmptyResourceFileError.ts -------------------------------------------------------------------------------- /src/errors/ErrorWithFilePath.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/errors/ErrorWithFilePath.ts -------------------------------------------------------------------------------- /src/errors/EvalFqlError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/errors/EvalFqlError.ts -------------------------------------------------------------------------------- /src/errors/ExpectedNumber.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/errors/ExpectedNumber.ts -------------------------------------------------------------------------------- /src/errors/TriedChangingMissingCloudResourceError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/errors/TriedChangingMissingCloudResourceError.ts -------------------------------------------------------------------------------- /src/errors/TriedDeletingMissingCloudResourceError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/errors/TriedDeletingMissingCloudResourceError.ts -------------------------------------------------------------------------------- /src/errors/UndefinedReferenceError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/errors/UndefinedReferenceError.ts -------------------------------------------------------------------------------- /src/errors/UpdateIndexError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/errors/UpdateIndexError.ts -------------------------------------------------------------------------------- /src/errors/WrongCreateTypeError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/errors/WrongCreateTypeError.ts -------------------------------------------------------------------------------- /src/errors/WrongResourceTypeError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/errors/WrongResourceTypeError.ts -------------------------------------------------------------------------------- /src/errors/detect-errors.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/errors/detect-errors.ts -------------------------------------------------------------------------------- /src/fql/eval.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/fql/eval.ts -------------------------------------------------------------------------------- /src/fql/json.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/fql/json.ts -------------------------------------------------------------------------------- /src/fql/match.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/fql/match.ts -------------------------------------------------------------------------------- /src/fql/print.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/fql/print.ts -------------------------------------------------------------------------------- /src/fql/transform.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/fql/transform.ts -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/interactive-shell/colors.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/interactive-shell/colors.ts -------------------------------------------------------------------------------- /src/interactive-shell/interactive-shell.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/interactive-shell/interactive-shell.tsx -------------------------------------------------------------------------------- /src/interactive-shell/shell.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/interactive-shell/shell.ts -------------------------------------------------------------------------------- /src/migrations/advance.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/migrations/advance.ts -------------------------------------------------------------------------------- /src/migrations/diff.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/migrations/diff.ts -------------------------------------------------------------------------------- /src/migrations/generate-migration.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/migrations/generate-migration.ts -------------------------------------------------------------------------------- /src/migrations/generate-query.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/migrations/generate-query.ts -------------------------------------------------------------------------------- /src/migrations/plan.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/migrations/plan.ts -------------------------------------------------------------------------------- /src/migrations/rollback.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/migrations/rollback.ts -------------------------------------------------------------------------------- /src/state/from-cloud.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/state/from-cloud.ts -------------------------------------------------------------------------------- /src/state/from-code.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/state/from-code.ts -------------------------------------------------------------------------------- /src/state/from-migration-files.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/state/from-migration-files.ts -------------------------------------------------------------------------------- /src/state/from-resource-files.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/state/from-resource-files.ts -------------------------------------------------------------------------------- /src/tasks.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/tasks.ts -------------------------------------------------------------------------------- /src/tasks/_copy.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/tasks/_copy.ts -------------------------------------------------------------------------------- /src/tasks/_new.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/tasks/_new.ts -------------------------------------------------------------------------------- /src/tasks/_plan.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/tasks/_plan.ts -------------------------------------------------------------------------------- /src/tasks/_validate.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/tasks/_validate.ts -------------------------------------------------------------------------------- /src/tasks/apply.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/tasks/apply.ts -------------------------------------------------------------------------------- /src/tasks/init.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/tasks/init.ts -------------------------------------------------------------------------------- /src/tasks/migrate.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/tasks/migrate.ts -------------------------------------------------------------------------------- /src/tasks/rollback.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/tasks/rollback.ts -------------------------------------------------------------------------------- /src/tasks/run.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/tasks/run.ts -------------------------------------------------------------------------------- /src/tasks/state.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/tasks/state.ts -------------------------------------------------------------------------------- /src/templates/functions-onefile.template.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/templates/functions-onefile.template.js -------------------------------------------------------------------------------- /src/templates/functions-perfile.template.js: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | export default Lambda(['x'], Var('x')) 5 | -------------------------------------------------------------------------------- /src/types/clients.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/types/clients.ts -------------------------------------------------------------------------------- /src/types/expressions.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/types/expressions.ts -------------------------------------------------------------------------------- /src/types/migrations.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/types/migrations.ts -------------------------------------------------------------------------------- /src/types/patterns.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/types/patterns.ts -------------------------------------------------------------------------------- /src/types/resource-types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/types/resource-types.ts -------------------------------------------------------------------------------- /src/util/config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/util/config.ts -------------------------------------------------------------------------------- /src/util/defaults.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/util/defaults.ts -------------------------------------------------------------------------------- /src/util/fauna-client.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/util/fauna-client.ts -------------------------------------------------------------------------------- /src/util/files.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/util/files.ts -------------------------------------------------------------------------------- /src/util/unique-naming.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/src/util/unique-naming.ts -------------------------------------------------------------------------------- /tests/_helpers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/_helpers.ts -------------------------------------------------------------------------------- /tests/api/1a-load-from-strings.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/api/1a-load-from-strings.ts -------------------------------------------------------------------------------- /tests/api/1b-load-from-code.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/api/1b-load-from-code.ts -------------------------------------------------------------------------------- /tests/api/1c-load-from-path.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/api/1c-load-from-path.ts -------------------------------------------------------------------------------- /tests/api/2-diff-from-code.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/api/2-diff-from-code.ts -------------------------------------------------------------------------------- /tests/api/3-generate-migrations-from-code.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/api/3-generate-migrations-from-code.ts -------------------------------------------------------------------------------- /tests/api/4-generate-let-body-from-code.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/api/4-generate-let-body-from-code.ts -------------------------------------------------------------------------------- /tests/api/5-generate-apply-query-from-code.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/api/5-generate-apply-query-from-code.ts -------------------------------------------------------------------------------- /tests/api/6-generate-rollback-query-from-code.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/api/6-generate-rollback-query-from-code.ts -------------------------------------------------------------------------------- /tests/api/resourcesFQL/accounts.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'accounts' }) 5 | -------------------------------------------------------------------------------- /tests/api/resourcesJS/accounts.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/api/resourcesJS/accounts.js -------------------------------------------------------------------------------- /tests/api/resourcesTS/_accounts.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/api/resourcesTS/_accounts.ts -------------------------------------------------------------------------------- /tests/dependencies/circular_dependencies/resources/create_collection1.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/circular_dependencies/resources/create_collection1.fql -------------------------------------------------------------------------------- /tests/dependencies/circular_dependencies/resources/create_collection2.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/circular_dependencies/resources/create_collection2.fql -------------------------------------------------------------------------------- /tests/dependencies/circular_dependencies/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/circular_dependencies/test.ts -------------------------------------------------------------------------------- /tests/dependencies/circular_updates/resources1/create_collection1.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/circular_updates/resources1/create_collection1.fql -------------------------------------------------------------------------------- /tests/dependencies/circular_updates/resources1/create_collection2.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/circular_updates/resources1/create_collection2.fql -------------------------------------------------------------------------------- /tests/dependencies/circular_updates/resources2/update_collection1.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/circular_updates/resources2/update_collection1.fql -------------------------------------------------------------------------------- /tests/dependencies/circular_updates/resources2/update_collection2.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/circular_updates/resources2/update_collection2.fql -------------------------------------------------------------------------------- /tests/dependencies/circular_updates/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/circular_updates/test.ts -------------------------------------------------------------------------------- /tests/dependencies/deleted_dependencies/resources1/create_collection1.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/deleted_dependencies/resources1/create_collection1.fql -------------------------------------------------------------------------------- /tests/dependencies/deleted_dependencies/resources1/create_function1.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/deleted_dependencies/resources1/create_function1.fql -------------------------------------------------------------------------------- /tests/dependencies/deleted_dependencies/resources2/create_collection1.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/deleted_dependencies/resources2/create_collection1.fql -------------------------------------------------------------------------------- /tests/dependencies/deleted_dependencies/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/deleted_dependencies/test.ts -------------------------------------------------------------------------------- /tests/dependencies/duplicate_naming/resources/create_collection1.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/duplicate_naming/resources/create_collection1.fql -------------------------------------------------------------------------------- /tests/dependencies/duplicate_naming/resources/create_collection1_again.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/duplicate_naming/resources/create_collection1_again.fql -------------------------------------------------------------------------------- /tests/dependencies/duplicate_naming/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/duplicate_naming/test.ts -------------------------------------------------------------------------------- /tests/dependencies/fake_dependencies/resources/create_function.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/fake_dependencies/resources/create_function.fql -------------------------------------------------------------------------------- /tests/dependencies/fake_dependencies/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/fake_dependencies/test.ts -------------------------------------------------------------------------------- /tests/dependencies/undefined_dependencies/resources1/create_collection1.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/undefined_dependencies/resources1/create_collection1.fql -------------------------------------------------------------------------------- /tests/dependencies/undefined_dependencies/resources2/create_collection1.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/undefined_dependencies/resources2/create_collection1.fql -------------------------------------------------------------------------------- /tests/dependencies/undefined_dependencies/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/undefined_dependencies/test.ts -------------------------------------------------------------------------------- /tests/dependencies/working_dependencies/resources/create_accessprovider1.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/working_dependencies/resources/create_accessprovider1.fql -------------------------------------------------------------------------------- /tests/dependencies/working_dependencies/resources/create_collection1.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/working_dependencies/resources/create_collection1.fql -------------------------------------------------------------------------------- /tests/dependencies/working_dependencies/resources/create_collection2.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/working_dependencies/resources/create_collection2.fql -------------------------------------------------------------------------------- /tests/dependencies/working_dependencies/resources/create_index1.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/working_dependencies/resources/create_index1.fql -------------------------------------------------------------------------------- /tests/dependencies/working_dependencies/resources/create_index2.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/working_dependencies/resources/create_index2.fql -------------------------------------------------------------------------------- /tests/dependencies/working_dependencies/resources/create_role1.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/working_dependencies/resources/create_role1.fql -------------------------------------------------------------------------------- /tests/dependencies/working_dependencies/resources/create_role2.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/working_dependencies/resources/create_role2.fql -------------------------------------------------------------------------------- /tests/dependencies/working_dependencies/resources/create_udf1.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/working_dependencies/resources/create_udf1.fql -------------------------------------------------------------------------------- /tests/dependencies/working_dependencies/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/dependencies/working_dependencies/test.ts -------------------------------------------------------------------------------- /tests/general/disallow_non_create/resources/update_role.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/general/disallow_non_create/resources/update_role.fql -------------------------------------------------------------------------------- /tests/general/disallow_non_create/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/general/disallow_non_create/test.ts -------------------------------------------------------------------------------- /tests/general/multi_update_noop/resources1/create_collection.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'users' }) -------------------------------------------------------------------------------- /tests/general/multi_update_noop/resources1/create_function.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/general/multi_update_noop/resources1/create_function.js -------------------------------------------------------------------------------- /tests/general/multi_update_noop/resources1/create_index.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/general/multi_update_noop/resources1/create_index.fql -------------------------------------------------------------------------------- /tests/general/multi_update_noop/resources1/create_role.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/general/multi_update_noop/resources1/create_role.fql -------------------------------------------------------------------------------- /tests/general/multi_update_noop/resources2/create_collection.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'users' }) -------------------------------------------------------------------------------- /tests/general/multi_update_noop/resources2/create_function.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/general/multi_update_noop/resources2/create_function.js -------------------------------------------------------------------------------- /tests/general/multi_update_noop/resources2/create_index.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/general/multi_update_noop/resources2/create_index.fql -------------------------------------------------------------------------------- /tests/general/multi_update_noop/resources2/create_role.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/general/multi_update_noop/resources2/create_role.fql -------------------------------------------------------------------------------- /tests/general/multi_update_noop/resources3/create_collection.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'users' }) -------------------------------------------------------------------------------- /tests/general/multi_update_noop/resources3/create_function.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/general/multi_update_noop/resources3/create_function.js -------------------------------------------------------------------------------- /tests/general/multi_update_noop/resources3/create_index.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/general/multi_update_noop/resources3/create_index.fql -------------------------------------------------------------------------------- /tests/general/multi_update_noop/resources3/create_role.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/general/multi_update_noop/resources3/create_role.fql -------------------------------------------------------------------------------- /tests/general/multi_update_noop/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/general/multi_update_noop/test.ts -------------------------------------------------------------------------------- /tests/multi_apply/resources1/create_collection1.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'test1' }) -------------------------------------------------------------------------------- /tests/multi_apply/resources1/create_collection2.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'test2' }) -------------------------------------------------------------------------------- /tests/multi_apply/resources1/create_collection3.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'test3' }) -------------------------------------------------------------------------------- /tests/multi_apply/resources2/create_collection1.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/multi_apply/resources2/create_collection1.fql -------------------------------------------------------------------------------- /tests/multi_apply/resources2/create_collection3.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/multi_apply/resources2/create_collection3.fql -------------------------------------------------------------------------------- /tests/multi_apply/resources3/create_collection1.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/multi_apply/resources3/create_collection1.fql -------------------------------------------------------------------------------- /tests/multi_apply/resources3/create_collection4.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'test4' }) -------------------------------------------------------------------------------- /tests/multi_apply/resources4/create_collection1.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/multi_apply/resources4/create_collection1.fql -------------------------------------------------------------------------------- /tests/multi_apply/resources4/create_collection4.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/multi_apply/resources4/create_collection4.fql -------------------------------------------------------------------------------- /tests/multi_apply/resources4/create_collection5.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'test5'}) -------------------------------------------------------------------------------- /tests/multi_apply/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/multi_apply/test.ts -------------------------------------------------------------------------------- /tests/multi_db/create_child_dbs/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/multi_db/create_child_dbs/test.ts -------------------------------------------------------------------------------- /tests/multi_db/rollback_child_dbs/resources1/dbs/child1/dbs/child1a/create_collection.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/multi_db/rollback_child_dbs/resources1/dbs/child1/dbs/child1a/create_collection.fql -------------------------------------------------------------------------------- /tests/multi_db/rollback_child_dbs/resources1/dbs/child2/create_collection.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/multi_db/rollback_child_dbs/resources1/dbs/child2/create_collection.fql -------------------------------------------------------------------------------- /tests/multi_db/rollback_child_dbs/resources2/dbs/child1/dbs/child1a/create_collection.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/multi_db/rollback_child_dbs/resources2/dbs/child1/dbs/child1a/create_collection.fql -------------------------------------------------------------------------------- /tests/multi_db/rollback_child_dbs/resources2/dbs/child1/dbs/child1a/create_function.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/multi_db/rollback_child_dbs/resources2/dbs/child1/dbs/child1a/create_function.fql -------------------------------------------------------------------------------- /tests/multi_db/rollback_child_dbs/resources2/dbs/child2/create_function.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/multi_db/rollback_child_dbs/resources2/dbs/child2/create_function.fql -------------------------------------------------------------------------------- /tests/multi_db/rollback_child_dbs/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/multi_db/rollback_child_dbs/test.ts -------------------------------------------------------------------------------- /tests/multi_db/update_child_db_content/resources1/dbs/child1/dbs/child1a/create_collection.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/multi_db/update_child_db_content/resources1/dbs/child1/dbs/child1a/create_collection.fql -------------------------------------------------------------------------------- /tests/multi_db/update_child_db_content/resources1/dbs/child2/create_collection.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/multi_db/update_child_db_content/resources1/dbs/child2/create_collection.fql -------------------------------------------------------------------------------- /tests/multi_db/update_child_db_content/resources2/dbs/child1/dbs/child1a/create_collection.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/multi_db/update_child_db_content/resources2/dbs/child1/dbs/child1a/create_collection.fql -------------------------------------------------------------------------------- /tests/multi_db/update_child_db_content/resources2/dbs/child1/dbs/child1a/create_function.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/multi_db/update_child_db_content/resources2/dbs/child1/dbs/child1a/create_function.fql -------------------------------------------------------------------------------- /tests/multi_db/update_child_db_content/resources2/dbs/child2/create_function.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/multi_db/update_child_db_content/resources2/dbs/child2/create_function.fql -------------------------------------------------------------------------------- /tests/multi_db/update_child_db_content/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/multi_db/update_child_db_content/test.ts -------------------------------------------------------------------------------- /tests/multi_db/update_child_dbs/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/multi_db/update_child_dbs/test.ts -------------------------------------------------------------------------------- /tests/rollbacks/separate_rollbacks/resources1/create_collection1.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'test1' }) -------------------------------------------------------------------------------- /tests/rollbacks/separate_rollbacks/resources1/create_collection2.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'test2' }) -------------------------------------------------------------------------------- /tests/rollbacks/separate_rollbacks/resources1/create_collection3.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'test3' }) -------------------------------------------------------------------------------- /tests/rollbacks/separate_rollbacks/resources2/create_collection1.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/rollbacks/separate_rollbacks/resources2/create_collection1.fql -------------------------------------------------------------------------------- /tests/rollbacks/separate_rollbacks/resources2/create_collection3.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/rollbacks/separate_rollbacks/resources2/create_collection3.fql -------------------------------------------------------------------------------- /tests/rollbacks/separate_rollbacks/resources3/create_collection1.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/rollbacks/separate_rollbacks/resources3/create_collection1.fql -------------------------------------------------------------------------------- /tests/rollbacks/separate_rollbacks/resources3/create_collection4.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'test4' }) -------------------------------------------------------------------------------- /tests/rollbacks/separate_rollbacks/resources4/create_collection1.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/rollbacks/separate_rollbacks/resources4/create_collection1.fql -------------------------------------------------------------------------------- /tests/rollbacks/separate_rollbacks/resources4/create_collection4.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/rollbacks/separate_rollbacks/resources4/create_collection4.fql -------------------------------------------------------------------------------- /tests/rollbacks/separate_rollbacks/resources4/create_collection5.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'test5'}) -------------------------------------------------------------------------------- /tests/rollbacks/separate_rollbacks/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/rollbacks/separate_rollbacks/test.ts -------------------------------------------------------------------------------- /tests/single_apply/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/README.md -------------------------------------------------------------------------------- /tests/single_apply/accessproviders/create_ap/resources/create_ap.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/accessproviders/create_ap/resources/create_ap.fql -------------------------------------------------------------------------------- /tests/single_apply/accessproviders/create_ap/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/accessproviders/create_ap/test.ts -------------------------------------------------------------------------------- /tests/single_apply/accessproviders/delete_ap/resources1/create_ap.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/accessproviders/delete_ap/resources1/create_ap.fql -------------------------------------------------------------------------------- /tests/single_apply/accessproviders/delete_ap/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/accessproviders/delete_ap/test.ts -------------------------------------------------------------------------------- /tests/single_apply/accessproviders/update_ap/resources1/create_ap.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/accessproviders/update_ap/resources1/create_ap.fql -------------------------------------------------------------------------------- /tests/single_apply/accessproviders/update_ap/resources2/create_ap.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/accessproviders/update_ap/resources2/create_ap.fql -------------------------------------------------------------------------------- /tests/single_apply/accessproviders/update_ap/resources2/create_role.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/accessproviders/update_ap/resources2/create_role.fql -------------------------------------------------------------------------------- /tests/single_apply/accessproviders/update_ap/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/accessproviders/update_ap/test.ts -------------------------------------------------------------------------------- /tests/single_apply/collections/create_collection/resources/create_collection.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'test1' }) -------------------------------------------------------------------------------- /tests/single_apply/collections/create_collection/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/collections/create_collection/test.ts -------------------------------------------------------------------------------- /tests/single_apply/collections/delete_collection/resources1/create_collection.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'test1' }) -------------------------------------------------------------------------------- /tests/single_apply/collections/delete_collection/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/collections/delete_collection/test.ts -------------------------------------------------------------------------------- /tests/single_apply/collections/update_collection/resources1/create_collection.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'test1' }) -------------------------------------------------------------------------------- /tests/single_apply/collections/update_collection/resources2/create_collection.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/collections/update_collection/resources2/create_collection.fql -------------------------------------------------------------------------------- /tests/single_apply/collections/update_collection/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/collections/update_collection/test.ts -------------------------------------------------------------------------------- /tests/single_apply/functions/create_function/resources/create_function.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/functions/create_function/resources/create_function.fql -------------------------------------------------------------------------------- /tests/single_apply/functions/create_function/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/functions/create_function/test.ts -------------------------------------------------------------------------------- /tests/single_apply/functions/delete_function/resources1/create_function.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/functions/delete_function/resources1/create_function.fql -------------------------------------------------------------------------------- /tests/single_apply/functions/delete_function/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/functions/delete_function/test.ts -------------------------------------------------------------------------------- /tests/single_apply/functions/update_function/resources1/create_function.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/functions/update_function/resources1/create_function.fql -------------------------------------------------------------------------------- /tests/single_apply/functions/update_function/resources2/create_function.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/functions/update_function/resources2/create_function.fql -------------------------------------------------------------------------------- /tests/single_apply/functions/update_function/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/functions/update_function/test.ts -------------------------------------------------------------------------------- /tests/single_apply/indices/create_index/resources/create_collection.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'users' }) -------------------------------------------------------------------------------- /tests/single_apply/indices/create_index/resources/create_index.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/indices/create_index/resources/create_index.fql -------------------------------------------------------------------------------- /tests/single_apply/indices/create_index/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/indices/create_index/test.ts -------------------------------------------------------------------------------- /tests/single_apply/indices/delete_index/resources1/create_collection.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'users' }) -------------------------------------------------------------------------------- /tests/single_apply/indices/delete_index/resources1/create_index.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/indices/delete_index/resources1/create_index.fql -------------------------------------------------------------------------------- /tests/single_apply/indices/delete_index/resources2/create_collection.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'users' }) -------------------------------------------------------------------------------- /tests/single_apply/indices/delete_index/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/indices/delete_index/test.ts -------------------------------------------------------------------------------- /tests/single_apply/indices/update_index/resources1/create_collection.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'users' }) -------------------------------------------------------------------------------- /tests/single_apply/indices/update_index/resources1/create_index.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/indices/update_index/resources1/create_index.fql -------------------------------------------------------------------------------- /tests/single_apply/indices/update_index/resources2/create_collection.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'users' }) -------------------------------------------------------------------------------- /tests/single_apply/indices/update_index/resources2/create_index.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/indices/update_index/resources2/create_index.fql -------------------------------------------------------------------------------- /tests/single_apply/indices/update_index/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/indices/update_index/test.ts -------------------------------------------------------------------------------- /tests/single_apply/roles/create_role/resources/create_role.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/roles/create_role/resources/create_role.fql -------------------------------------------------------------------------------- /tests/single_apply/roles/create_role/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/roles/create_role/test.ts -------------------------------------------------------------------------------- /tests/single_apply/roles/delete_role/resources1/create_role.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/roles/delete_role/resources1/create_role.fql -------------------------------------------------------------------------------- /tests/single_apply/roles/delete_role/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/roles/delete_role/test.ts -------------------------------------------------------------------------------- /tests/single_apply/roles/update_role/resources1/create_role.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/roles/update_role/resources1/create_role.fql -------------------------------------------------------------------------------- /tests/single_apply/roles/update_role/resources2/create_collection.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'users' }) -------------------------------------------------------------------------------- /tests/single_apply/roles/update_role/resources2/create_role.fql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/roles/update_role/resources2/create_role.fql -------------------------------------------------------------------------------- /tests/single_apply/roles/update_role/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/single_apply/roles/update_role/test.ts -------------------------------------------------------------------------------- /tests/sources/resourcesFQL/accounts.fql: -------------------------------------------------------------------------------- 1 | // Copyright Fauna, Inc. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | CreateCollection({ name: 'accounts' }) 5 | -------------------------------------------------------------------------------- /tests/sources/resourcesJS/accounts.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/sources/resourcesJS/accounts.js -------------------------------------------------------------------------------- /tests/sources/resourcesTS/_accounts.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/sources/resourcesTS/_accounts.ts -------------------------------------------------------------------------------- /tests/sources/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tests/sources/test.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fauna-labs/fauna-schema-migrate/HEAD/tsconfig.json --------------------------------------------------------------------------------