[
  {
    "path": ".github/CODEOWNERS",
    "content": "translators/cockroach* @mclark4386\n# Default owner\n*                      @gobuffalo/core-managers @gobuffalo/database"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\ngithub: [markbates, stanislas-m]\npatreon: buffalo"
  },
  {
    "path": ".github/workflows/standard-stale.yml",
    "content": "name: Standard Autocloser\n\non:\n  schedule:\n    - cron: \"30 1 * * *\"\n\njobs:\n  call-standard-autocloser:\n    name: Autocloser\n    uses: gobuffalo/.github/.github/workflows/stale.yml@v1\n    secrets: inherit\n"
  },
  {
    "path": ".github/workflows/tests.yml",
    "content": "name: Tests\non:\n  push:\n    branches:\n      - main\n  pull_request:\n\njobs:\n  mysql-tests:\n    name: MySQL tests - Go v${{ matrix.go-version }}\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        go-version:\n          - \"1.17.x\"\n          - \"1.18.x\"\n\n    services:\n      mysql:\n        image: mysql:5.7\n        env:\n          MYSQL_ROOT_PASSWORD: root\n          MYSQL_DATABASE: pop_test\n          MYSQL_PORT: 3307\n        ports:\n          - 3307:3306\n        # needed because the mysql container does not provide a healthcheck\n        options: --health-cmd \"mysqladmin ping -h localhost\" --health-interval 5s --health-timeout 5s --health-retries 10\n\n    steps:\n      - uses: actions/checkout@v3\n      - name: Setup Go ${{ matrix.go }}\n        uses: actions/setup-go@v3\n        with:\n          go-version: ${{ matrix.go-version }}\n\n      - name: Install and run soda\n        env:\n          SODA_DIALECT: \"mysql\"\n          MYSQL_PORT: 3307\n        run: |\n          go install -tags sqlite github.com/gobuffalo/pop/v6/soda@latest\n          soda drop -e $SODA_DIALECT -p ./testdata/migrations\n          soda create -e $SODA_DIALECT -p ./testdata/migrations\n          soda migrate -e $SODA_DIALECT -p ./testdata/migrations\n\n      - name: Test\n        env:\n          SODA_DIALECT: \"mysql\"\n          MYSQL_PORT: 3307\n        run: |\n          go test -v -tags sqlite -race ./...\n\n      - name: Reset database and run e2e\n        env:\n          SODA_DIALECT: \"mysql\"\n        run: |\n          soda drop -e $SODA_DIALECT -p ./testdata/migrations\n          soda create -e $SODA_DIALECT -p ./testdata/migrations\n          cd testdata/e2e\n          go test -v -tags sqlite,e2e -race ./...\n\n  pg-tests:\n    name: PostgreSQL tests - Go v${{ matrix.go-version }}\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        go-version:\n          - \"1.17.x\"\n          - \"1.18.x\"\n\n    services:\n      postgres:\n        image: postgres:10\n        env:\n          POSTGRES_USER: postgres\n          POSTGRES_PASSWORD: postgres\n          POSTGRES_DB: postgres\n        ports:\n          - 5433:5432\n        # needed because the postgres container does not provide a healthcheck\n        options: --health-cmd pg_isready --health-interval 5s --health-timeout 5s --health-retries 10\n\n    steps:\n      - uses: actions/checkout@v3\n      - name: Setup Go ${{ matrix.go }}\n        uses: actions/setup-go@v3\n        with:\n          go-version: ${{ matrix.go-version }}\n\n      - name: Install and run soda\n        env:\n          SODA_DIALECT: \"postgres\"\n          POSTGRESQL_URL: \"postgres://postgres:postgres@${{job.services.postgres.host}}:${{ job.services.postgres.ports[5432] }}/pop_test?sslmode=disable\"\n        run: |\n          go install -tags sqlite github.com/gobuffalo/pop/v6/soda@latest\n          soda drop -e $SODA_DIALECT -p ./testdata/migrations\n          soda create -e $SODA_DIALECT -p ./testdata/migrations\n          soda migrate -e $SODA_DIALECT -p ./testdata/migrations\n\n      - name: Test\n        env:\n          SODA_DIALECT: \"postgres\"\n          POSTGRESQL_URL: \"postgres://postgres:postgres@${{job.services.postgres.host}}:${{ job.services.postgres.ports[5432] }}/pop_test?sslmode=disable\"\n        run: |\n          go test -v -tags sqlite -race ./...\n\n      - name: Reset database and run e2e\n        env:\n          SODA_DIALECT: \"postgres\"\n        run: |\n          soda drop -e $SODA_DIALECT -p ./testdata/migrations\n          soda create -e $SODA_DIALECT -p ./testdata/migrations\n          cd testdata/e2e\n          go test -v -tags sqlite,e2e -race ./...\n\n  crdb-tests:\n    name: Cockroach tests - Go v${{ matrix.go-version }}\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        go-version:\n          - \"1.17.x\"\n          - \"1.18.x\"\n\n    steps:\n      - uses: actions/checkout@v3\n      - name: Setup Go ${{ matrix.go }}\n        uses: actions/setup-go@v3\n        with:\n          go-version: ${{ matrix.go-version }}\n\n      - name: Install Cockroach\n        run: |\n          mkdir -p crdb\n          pushd crdb\n          wget -qO- https://binaries.cockroachdb.com/cockroach-v21.1.19.linux-amd64.tgz | tar -xz\n          mv cockroach-v21.1.19.linux-amd64/* .\n          ln -s `pwd`/cockroach /usr/local/bin/\n          cockroach version\n          ./cockroach start-single-node --insecure --background\n          popd\n\n      - name: Install and run soda\n        env:\n          SODA_DIALECT: \"cockroach\"\n          COCKROACH_PORT: 26257\n        run: |\n          go install -tags sqlite github.com/gobuffalo/pop/v6/soda@latest\n          soda drop -e $SODA_DIALECT -p ./testdata/migrations\n          soda create -e $SODA_DIALECT -p ./testdata/migrations\n          soda migrate -e $SODA_DIALECT -p ./testdata/migrations\n\n      - name: Test\n        env:\n          SODA_DIALECT: \"cockroach\"\n          COCKROACH_PORT: 26257\n        run: |\n          go test -v -tags sqlite -race ./...\n\n      - name: Reset database and run e2e\n        env:\n          SODA_DIALECT: \"cockroach\"\n          COCKROACH_PORT: 26257\n        run: |\n          soda drop -e $SODA_DIALECT -p ./testdata/migrations\n          soda create -e $SODA_DIALECT -p ./testdata/migrations\n          cd testdata/e2e\n          go test -v -tags sqlite,e2e -race ./...\n\n  sqlite-tests:\n    name: SQLite tests ${{ matrix.os }} - Go v${{ matrix.go-version }}\n    runs-on: ${{ matrix.os }}\n    strategy:\n      matrix:\n        go-version:\n          - \"1.17.x\"\n          - \"1.18.x\"\n        os:\n          - \"macos-latest\"\n          - \"windows-latest\"\n          - \"ubuntu-latest\"\n\n    steps:\n      - name: Install sqlite3\n        run: choco install sqlite\n        if: matrix.os == 'windows-latest'\n\n      - uses: actions/checkout@v3\n      - name: Setup Go ${{ matrix.go }}\n        uses: actions/setup-go@v3\n        with:\n          go-version: ${{ matrix.go-version }}\n\n      - name: Install and run soda\n        env:\n          SODA_DIALECT: \"sqlite\"\n        run: |\n          go install -tags sqlite github.com/gobuffalo/pop/v6/soda@latest\n          soda drop -e $SODA_DIALECT -p ./testdata/migrations\n          soda create -e $SODA_DIALECT -p ./testdata/migrations\n          soda migrate -e $SODA_DIALECT -p ./testdata/migrations\n        shell: bash\n\n      - name: Test\n        if: ${{ matrix.os != 'windows-latest' }}\n        env:\n          SODA_DIALECT: \"sqlite\"\n        run: |\n          go test -v -tags sqlite -race ./...\n        shell: bash\n\n      - name: Test without race detection\n        if: ${{ matrix.os == 'windows-latest' }}\n        env:\n          SODA_DIALECT: \"sqlite\"\n        run: |\n          go test -v -tags sqlite ./...\n        shell: bash\n\n      - name: Reset database and run e2e\n        if: ${{ matrix.os != 'windows-latest' }}\n        env:\n          SODA_DIALECT: \"sqlite\"\n        run: |\n          soda drop -e $SODA_DIALECT -p ./testdata/migrations\n          soda create -e $SODA_DIALECT -p ./testdata/migrations\n          cd testdata/e2e\n          go test -v -tags sqlite,e2e -race ./...\n        shell: bash\n\n      - name: Reset database and run e2e without race detection\n        if: ${{ matrix.os == 'windows-latest' }}\n        env:\n          SODA_DIALECT: \"sqlite\"\n        run: |\n          soda drop -e $SODA_DIALECT -p ./testdata/migrations\n          soda create -e $SODA_DIALECT -p ./testdata/migrations\n          cd testdata/e2e\n          go test -v -tags sqlite,e2e ./...\n        shell: bash\n"
  },
  {
    "path": ".gitignore",
    "content": "*.log\n.DS_Store\ndoc\ntmp\npkg\n*.gem\n*.pid\ncoverage\ncoverage.data\nbuild/*\n*.pbxuser\n*.mode1v3\n.svn\nprofile\n.console_history\n.sass-cache/*\n.rake_tasks~\n*.log.lck\nsolr/\n.jhw-cache/\njhw.*\n*.sublime*\nnode_modules/\ndist/\ngenerated/\n.vendor/\nbin/*\ngin-bin\n.idea/\n.vscode/\ncockroach-data/\nmigrations/schema.sql\nvendor/\nsqldumps/\nsql/\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2019 Mark Bates\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "Makefile",
    "content": "TAGS ?= sqlite\nGO_BIN ?= go\n\ninstall:\n\t$(GO_BIN) install -tags ${TAGS} -v .\n\ntidy:\n\t$(GO_BIN) mod tidy\n\nbuild:\n\t$(GO_BIN) build -v .\n\ntest:\n\t./test.sh -cover -v\n\nlint:\n\tgo get github.com/golangci/golangci-lint/cmd/golangci-lint\n\tgolangci-lint run --enable-all\n\nupdate:\n\trm go.*\n\t$(GO_BIN) mod init github.com/gobuffalo/fizz\n\t$(GO_BIN) mod tidy --go=1.16\n"
  },
  {
    "path": "README.md",
    "content": "# Fizz\n\n[![Actions Status](https://github.com/gobuffalo/fizz/workflows/Tests/badge.svg)](https://github.com/gobuffalo/fizz/actions)\n[![Go Reference](https://pkg.go.dev/badge/github.com/gobuffalo/fizz.svg)](https://pkg.go.dev/github.com/gobuffalo/fizz)\n\nA Common DSL for Migrating Databases\n\n\n## Supported Database Engines\n\nFizz supports minimum supported version of all supported database engines.\nCurrently, the following database engines are officially supported. (Since\nFizz is used with the migration feature of Pop, supported databases and the\nversions are correlated with Pop.)\n\n* PostgreSQL 10\n* MySQL 5.7 / MariaDB 10.3\n* SQLite3 3.22\n* CockroachDB v21.1\n* MSSQL 2017 (not fully supported)\n\n\n## Usage\n\n### Create a Table\n\n``` javascript\ncreate_table(\"users\") {\n  t.Column(\"id\", \"integer\", {primary: true})\n  t.Column(\"email\", \"string\", {})\n  t.Column(\"twitter_handle\", \"string\", {\"size\": 50})\n  t.Column(\"age\", \"integer\", {\"default\": 0})\n  t.Column(\"admin\", \"bool\", {\"default\": false})\n  t.Column(\"company_id\", \"uuid\", {\"default_raw\": \"uuid_generate_v1()\"})\n  t.Column(\"bio\", \"text\", {\"null\": true})\n  t.Column(\"joined_at\", \"timestamp\", {})\n  t.Index(\"email\", {\"unique\": true})\n}\n\ncreate_table(\"todos\") {\n  t.Column(\"user_id\", \"integer\", {})\n  t.Column(\"title\", \"string\", {\"size\": 100})\n  t.Column(\"details\", \"text\", {\"null\": true})\n  t.ForeignKey(\"user_id\", {\"users\": [\"id\"]}, {\"on_delete\": \"cascade\"})\n}\n```\n\nThe `id` column don't have to be an integer. For instance, your can use an UUID type instead:\n\n```javascript\ncreate_table(\"users\") {\n  t.Column(\"id\", \"uuid\", {primary: true})\n  // ...\n}\n```\n\nBy default, fizz will generate two `timestamp` columns: `created_at` and `updated_at`.\n\nThe `t.Columns` method takes the following arguments: name of the column, the type of the field, and finally the last argument is any options you want to set on that column.\n\n#### <a name=\"column-info\"></a> \"Common\" Types:\n\n* `string`\n* `text`\n* `timestamp`, `time`, `datetime`\n* `integer`\n* `bool`\n* `uuid`\n\nAny other type passed it will be be passed straight through to the underlying database.\n\nFor example for PostgreSQL you could pass `jsonb`and it will be supported, however, SQLite will yell very loudly at you if you do the same thing!\n\n#### Supported Options:\n\n* `size` - The size of the column. For example if you wanted a `varchar(50)` in Postgres you would do: `t.Column(\"column_name\", \"string\", {\"size\": 50})`\n* `null` - By default columns are not allowed to be `null`.\n* `default` - The default value you want for this column. By default this is `null`.\n* `default_raw` - The default value defined as a database function.\n* `after` - (MySQL Only) Add a column after another column in the table. `example: {\"after\":\"created_at\"}`\n* `first` - (MySQL Only) Add a column to the first position in the table. `example: {\"first\": true}`\n\n#### Composite primary key \n\n```javascript\ncreate_table(\"user_privileges\") {\n\tt.Column(\"user_id\", \"int\")\n\tt.Column(\"privilege_id\", \"int\")\n\tt.PrimaryKey(\"user_id\", \"privilege_id\")\n}\n```\n\nPlease note that the `t.PrimaryKey` statement MUST be after the columns definitions.\n\n### Drop a Table\n\n``` javascript\ndrop_table(\"table_name\")\n```\n\n### Rename a Table\n\n``` javascript\nrename_table(\"old_table_name\", \"new_table_name\")\n```\n\n### Add a Column\n\n``` javascript\nadd_column(\"table_name\", \"column_name\", \"string\", {})\n```\n\nSee [above](#column-info) for more details on column types and options.\n\n### Alter a column\n\n``` javascript\nchange_column(\"table_name\", \"column_name\", \"string\", {})\n```\n\n### Rename a Column\n\n``` javascript\nrename_column(\"table_name\", \"old_column_name\", \"new_column_name\")\n```\n\n### Drop a Column\n\n``` javascript\ndrop_column(\"table_name\", \"column_name\")\n```\n\n### Add an Index\n\n#### Supported Options:\n\n* `name` - This defaults to `table_name_column_name_idx`\n* `unique`\n\n#### Simple Index:\n\n``` javascript\nadd_index(\"table_name\", \"column_name\", {})\n```\n\n#### Multi-Column Index:\n\n``` javascript\nadd_index(\"table_name\", [\"column_1\", \"column_2\"], {})\n```\n\n#### Unique Index:\n\n``` javascript\nadd_index(\"table_name\", \"column_name\", {\"unique\": true})\n```\n\n#### Index Names:\n\n``` javascript\nadd_index(\"table_name\", \"column_name\", {}) # name => table_name_column_name_idx\nadd_index(\"table_name\", \"column_name\", {\"name\": \"custom_index_name\"})\n```\n\n### Rename an Index\n\n``` javascript\nrename_index(\"table_name\", \"old_index_name\", \"new_index_name\")\n```\n\n### Drop an Index\n\n``` javascript\ndrop_index(\"table_name\", \"index_name\")\n```\n\n### Add a Foreign Key\n\n```javascript\nadd_foreign_key(\"table_name\", \"field\", {\"ref_table_name\": [\"ref_column\"]}, {\n    \"name\": \"optional_fk_name\",\n    \"on_delete\": \"action\",\n    \"on_update\": \"action\",\n})\n\n```\n\n#### Supported Options\n\n* `name` - This defaults to `table_name_ref_table_name_ref_column_name_fk`\n* `on_delete` - `CASCADE`, `SET NULL`, ...\n* `on_update`\n\n**Note:** `on_update` and `on_delete` are not supported on CockroachDB yet.\n\n### Drop a Foreign Key\n\n```javascript\ndrop_foreign_key(\"table_name\", \"fk_name\", {\"if_exists\": true})\n```\n\n#### Supported Options\n\n* `if_exists` - Adds `IF EXISTS` condition\n\n\n### Raw SQL\n\n``` javascript\nsql(\"select * from users;\")\n```\n\n### Execute an External Command\n\nSometimes during a migration you need to shell out to an external command.\n\n```javascript\nexec(\"echo hello\")\n```\n\n## Development\n\n### Testing\n\nTo run end-to-end tests, use\n\n```\nmake test\n```\n\nIf you made changes to the end-to-end tests and want to update the fixtures,\nrun the following command a couple of times until tests pass:\n\n```\nREFRESH_FIXTURES=true make test\n```\n"
  },
  {
    "path": "SHOULDERS.md",
    "content": "# Fizz Stands on the Shoulders of Giants\n\nFizz does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants, this project would not be possible. Please make sure to check them out and thank them for all of their hard work.\n\nThank you to the following **GIANTS**:\n\n* [github.com/Masterminds/semver/v3](https://godoc.org/github.com/Masterminds/semver/v3)\n* [github.com/aymerick/douceur](https://godoc.org/github.com/aymerick/douceur)\n* [github.com/davecgh/go-spew](https://godoc.org/github.com/davecgh/go-spew)\n* [github.com/fatih/structs](https://godoc.org/github.com/fatih/structs)\n* [github.com/go-sql-driver/mysql](https://godoc.org/github.com/go-sql-driver/mysql)\n* [github.com/gobuffalo/flect](https://godoc.org/github.com/gobuffalo/flect)\n* [github.com/gobuffalo/github_flavored_markdown](https://godoc.org/github.com/gobuffalo/github_flavored_markdown)\n* [github.com/gobuffalo/helpers](https://godoc.org/github.com/gobuffalo/helpers)\n* [github.com/gobuffalo/plush/v4](https://godoc.org/github.com/gobuffalo/plush/v4)\n* [github.com/gobuffalo/tags/v3](https://godoc.org/github.com/gobuffalo/tags/v3)\n* [github.com/gobuffalo/validate/v3](https://godoc.org/github.com/gobuffalo/validate/v3)\n* [github.com/gofrs/uuid](https://godoc.org/github.com/gofrs/uuid)\n* [github.com/gorilla/css](https://godoc.org/github.com/gorilla/css)\n* [github.com/kballard/go-shellquote](https://godoc.org/github.com/kballard/go-shellquote)\n* [github.com/kr/pretty](https://godoc.org/github.com/kr/pretty)\n* [github.com/kr/pty](https://godoc.org/github.com/kr/pty)\n* [github.com/kr/text](https://godoc.org/github.com/kr/text)\n* [github.com/microcosm-cc/bluemonday](https://godoc.org/github.com/microcosm-cc/bluemonday)\n* [github.com/pmezard/go-difflib](https://godoc.org/github.com/pmezard/go-difflib)\n* [github.com/sergi/go-diff](https://godoc.org/github.com/sergi/go-diff)\n* [github.com/sourcegraph/annotate](https://godoc.org/github.com/sourcegraph/annotate)\n* [github.com/sourcegraph/syntaxhighlight](https://godoc.org/github.com/sourcegraph/syntaxhighlight)\n* [github.com/stretchr/objx](https://godoc.org/github.com/stretchr/objx)\n* [github.com/stretchr/testify](https://godoc.org/github.com/stretchr/testify)\n* [golang.org/x/net](https://godoc.org/golang.org/x/net)\n* [golang.org/x/sync](https://godoc.org/golang.org/x/sync)\n* [golang.org/x/sys](https://godoc.org/golang.org/x/sys)\n* [golang.org/x/term](https://godoc.org/golang.org/x/term)\n* [golang.org/x/text](https://godoc.org/golang.org/x/text)\n* [golang.org/x/tools](https://godoc.org/golang.org/x/tools)\n* [gopkg.in/check.v1](https://godoc.org/gopkg.in/check.v1)\n* [gopkg.in/yaml.v2](https://godoc.org/gopkg.in/yaml.v2)\n* [gopkg.in/yaml.v3](https://godoc.org/gopkg.in/yaml.v3)\n"
  },
  {
    "path": "bubbler.go",
    "content": "package fizz\n\nimport (\n\t\"os\"\n\t\"strings\"\n\n\t\"github.com/gobuffalo/plush/v4\"\n)\n\ntype BubbleType int\n\ntype Bubbler struct {\n\tTranslator\n\tdata []string\n}\n\nfunc NewBubbler(t Translator) *Bubbler {\n\treturn &Bubbler{\n\t\tTranslator: t,\n\t\tdata:       []string{},\n\t}\n}\n\nfunc (b *Bubbler) String() string {\n\treturn strings.Join(b.data, \"\\n\")\n}\n\nfunc (b *Bubbler) Bubble(s string) (string, error) {\n\tf := fizzer{b}\n\tctx := plush.NewContextWith(map[string]interface{}{\n\t\t\"exec\":             f.Exec(os.Stdout),\n\t\t\"create_table\":     f.CreateTable,\n\t\t\"change_column\":    f.ChangeColumn,\n\t\t\"add_column\":       f.AddColumn,\n\t\t\"drop_column\":      f.DropColumn,\n\t\t\"rename_column\":    f.RenameColumn,\n\t\t\"raw\":              f.RawSQL,\n\t\t\"sql\":              f.RawSQL,\n\t\t\"add_index\":        f.AddIndex,\n\t\t\"drop_index\":       f.DropIndex,\n\t\t\"rename_index\":     f.RenameIndex,\n\t\t\"add_foreign_key\":  f.AddForeignKey,\n\t\t\"drop_foreign_key\": f.DropForeignKey,\n\t\t\"drop_table\":       f.DropTable,\n\t\t\"rename_table\":     f.RenameTable,\n\t})\n\n\terr := plush.RunScript(s, ctx)\n\n\treturn b.String(), err\n}\n"
  },
  {
    "path": "bubbler_test.go",
    "content": "package fizz\n\nimport (\n\t\"bytes\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc Test_Exec(t *testing.T) {\n\tr := require.New(t)\n\n\tb := NewBubbler(nil)\n\tf := fizzer{b}\n\tbb := &bytes.Buffer{}\n\tc := f.Exec(bb)\n\tr.NoError(c(\"echo hello\"))\n\tr.Equal(\"hello\", strings.TrimSpace(bb.String()))\n}\n\nfunc Test_ExecQuoted(t *testing.T) {\n\tr := require.New(t)\n\n\tb := NewBubbler(nil)\n\tf := fizzer{b}\n\tbb := &bytes.Buffer{}\n\tc := f.Exec(bb)\n\t// without proper splitting we would get \"'a b c'\"\n\tr.NoError(c(\"echo 'a b c'\"))\n\tr.Equal(\"a b c\", strings.TrimSpace(bb.String()))\n}\n"
  },
  {
    "path": "columns.go",
    "content": "package fizz\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"sort\"\n\t\"strings\"\n)\n\n// Deprecated: Fizz won't force you to have an ID field now.\nvar INT_ID_COL = Column{\n\tName:    \"id\",\n\tPrimary: true,\n\tColType: \"integer\",\n\tOptions: Options{},\n}\n\n// Deprecated: Fizz won't force you to have an ID field now.\nvar UUID_ID_COL = Column{\n\tName:    \"id\",\n\tPrimary: true,\n\tColType: \"uuid\",\n\tOptions: Options{},\n}\n\nvar CREATED_COL = Column{Name: \"created_at\", ColType: \"timestamp\", Options: nil}\nvar UPDATED_COL = Column{Name: \"updated_at\", ColType: \"timestamp\", Options: nil}\n\ntype Column struct {\n\tName    string\n\tColType string\n\tPrimary bool\n\tOptions map[string]interface{}\n}\n\nfunc (c Column) String() string {\n\tif c.Primary || c.Options != nil {\n\t\tvar opts map[string]interface{}\n\t\tif c.Options == nil {\n\t\t\topts = make(map[string]interface{})\n\t\t} else {\n\t\t\topts = c.Options\n\t\t}\n\t\tif c.Primary {\n\t\t\topts[\"primary\"] = true\n\t\t}\n\n\t\to := make([]string, 0, len(opts))\n\t\tfor k, v := range opts {\n\t\t\tvv, _ := json.Marshal(v)\n\t\t\to = append(o, fmt.Sprintf(\"%s: %s\", k, string(vv)))\n\t\t}\n\t\tsort.SliceStable(o, func(i, j int) bool { return o[i] < o[j] })\n\t\treturn fmt.Sprintf(`t.Column(\"%s\", \"%s\", {%s})`, c.Name, c.ColType, strings.Join(o, \", \"))\n\t}\n\treturn fmt.Sprintf(`t.Column(\"%s\", \"%s\")`, c.Name, c.ColType)\n}\n\nfunc (f fizzer) ChangeColumn(table, name, ctype string, options Options) error {\n\tt := Table{\n\t\tName: table,\n\t\tColumns: []Column{\n\t\t\t{Name: name, ColType: ctype, Options: options},\n\t\t},\n\t}\n\treturn f.add(f.Bubbler.ChangeColumn(t))\n}\n\nfunc (f fizzer) AddColumn(table, name, ctype string, options Options) error {\n\tt := Table{\n\t\tName: table,\n\t\tColumns: []Column{\n\t\t\t{Name: name, ColType: ctype, Options: options},\n\t\t},\n\t}\n\treturn f.add(f.Bubbler.AddColumn(t))\n}\n\nfunc (f fizzer) DropColumn(table, name string) error {\n\tt := Table{\n\t\tName: table,\n\t\tColumns: []Column{\n\t\t\t{Name: name},\n\t\t},\n\t}\n\treturn f.add(f.Bubbler.DropColumn(t))\n}\n\nfunc (f fizzer) RenameColumn(table, old, new string) error {\n\tt := Table{\n\t\tName: table,\n\t\tColumns: []Column{\n\t\t\t{Name: old},\n\t\t\t{Name: new},\n\t\t},\n\t}\n\treturn f.add(f.Bubbler.RenameColumn(t))\n}\n"
  },
  {
    "path": "columns_test.go",
    "content": "package fizz_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/gobuffalo/fizz\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc Test_Column_Stringer(t *testing.T) {\n\tt.Run(\"primary column\", func(tt *testing.T) {\n\t\tr := require.New(tt)\n\t\tc := fizz.Column{\n\t\t\tName:    \"pk\",\n\t\t\tColType: \"int\",\n\t\t\tPrimary: true,\n\t\t}\n\n\t\tr.Equal(`t.Column(\"pk\", \"int\", {primary: true})`, c.String())\n\t})\n\n\tt.Run(\"primary column with raw default\", func(tt *testing.T) {\n\t\tr := require.New(tt)\n\t\tc := fizz.Column{\n\t\t\tName:    \"pk\",\n\t\t\tColType: \"int\",\n\t\t\tPrimary: true,\n\t\t\tOptions: map[string]interface{}{\n\t\t\t\t\"default_raw\": \"uuid_generate_v4()\",\n\t\t\t},\n\t\t}\n\n\t\tr.Equal(`t.Column(\"pk\", \"int\", {default_raw: \"uuid_generate_v4()\", primary: true})`, c.String())\n\t})\n\n\tt.Run(\"simple column\", func(tt *testing.T) {\n\t\tr := require.New(tt)\n\t\tc := fizz.Column{\n\t\t\tName:    \"name\",\n\t\t\tColType: \"string\",\n\t\t}\n\n\t\tr.Equal(`t.Column(\"name\", \"string\")`, c.String())\n\t})\n\n\tt.Run(\"with option\", func(tt *testing.T) {\n\t\tr := require.New(tt)\n\t\tc := fizz.Column{\n\t\t\tName:    \"alive\",\n\t\t\tColType: \"boolean\",\n\t\t\tOptions: map[string]interface{}{\n\t\t\t\t\"null\": true,\n\t\t\t},\n\t\t}\n\n\t\tr.Equal(`t.Column(\"alive\", \"boolean\", {null: true})`, c.String())\n\t})\n\n\tt.Run(\"with string option\", func(tt *testing.T) {\n\t\tr := require.New(tt)\n\t\tc := fizz.Column{\n\t\t\tName:    \"price\",\n\t\t\tColType: \"numeric\",\n\t\t\tOptions: map[string]interface{}{\n\t\t\t\t\"default\": \"1.00\",\n\t\t\t},\n\t\t}\n\n\t\tr.Equal(`t.Column(\"price\", \"numeric\", {default: \"1.00\"})`, c.String())\n\t})\n}\n"
  },
  {
    "path": "database.yml",
    "content": "mysql:\n  dialect: \"mysql\"\n  database: \"pop_test\"\n  host: {{ envOr \"MYSQL_HOST\" \"127.0.0.1\"  }}\n  port: {{ envOr \"MYSQL_PORT\" \"3307\"  }}\n  user: {{ envOr \"MYSQL_USER\"  \"root\"  }}\n  password: {{ envOr \"MYSQL_PASSWORD\" \"root\"  }}\n\npostgres:\n  url: \"postgres://postgres:postgres@localhost:5433/pop_test?sslmode=disable\"\n  pool: 25\n\ncockroach:\n  # url: \"cockroach://root@127.0.0.1:26258/pop_test?application_name=cockroach&sslmode=disable\"\n  dialect: \"cockroach\"\n  database: \"pop_test\"\n  host: {{ envOr \"COCKROACH_HOST\" \"127.0.0.1\"  }}\n  port: {{ envOr \"COCKROACH_PORT\" \"26258\"  }}\n  user: {{ envOr \"COCKROACH_USER\" \"root\"  }}\n  password: {{ envOr \"COCKROACH_PASSWORD\" \"\"  }}\n  options:\n    sslmode: disable\n\nsqlserver:\n  dialect: \"sqlserver\"\n  database: \"pop_test\"\n  host: {{ envOr \"MSSQLSERVER_HOST\" \"127.0.0.1\"  }}\n  port: {{ envOr \"MSSQLSERVER_PORT\" \"1433\"  }}\n  user: {{ envOr \"MSSQLSERVER_USER\" \"sa\"  }}\n  password: {{ envOr \"MSSQLSERVER_PASSWORD\" \"Tt@12345678\"  }}\n\nsqlite:\n  dialect: \"sqlite3\"\n  database: \"./tmp/test.sqlite\"\n  options:\n    mode: rwc\n\n"
  },
  {
    "path": "docker-compose.yml",
    "content": "version: '2'\n\nservices:\n  mysql:\n    image: mysql:5.7\n    environment:\n      - MYSQL_ROOT_PASSWORD=root\n      - MYSQL_DATABASE=pop_test\n      - MYSQL_USER=pop\n      - MYSQL_PASSWORD=pop\n    #volumes:\n      #- ./_vol/mysql:/docker-entrypoint-initdb.d\n    ports:\n      - \"3307:3306\"\n    healthcheck:\n      test: [\"CMD\", \"mysqladmin\" ,\"ping\", \"-h\", \"localhost\"]\n      interval: 5s\n      timeout: 5s\n      retries: 10\n      start_period: 3s\n\n  postgres:\n    image: postgres:10\n    environment:\n      - POSTGRES_DB=pop_test\n      - POSTGRES_PASSWORD=postgres\n    ports:\n      - \"5433:5432\"\n    #volumes:\n      #- ./_vol/postgres:/docker-entrypoint-initdb.d\n    healthcheck:\n      test: [\"CMD\", \"pg_isready\"]\n      interval: 5s\n      timeout: 5s\n      retries: 10\n      start_period: 3s\n\n  cockroach:\n    image: cockroachdb/cockroach:latest-v21.1\n    ports:\n      - \"26258:26257\"\n      - \"8081:8080\"\n    #volumes:\n      #- ./_vol/cockroach:/cockroach/cockroach-data\n    command: start-single-node --insecure\n    healthcheck:\n      test: [\"CMD\", \"curl\", \"http://localhost:8080/health\"]\n      interval: 5s\n      timeout: 5s\n      retries: 10\n      start_period: 3s\n\n#  mssqlserver:\n#    image: \"microsoft/mssql-server-linux\"\n#    environment:\n#      - SA_PASSWORD=Tt@12345678\n#      - MSSQLSERVER_PASSWORD=Tt@12345678\n#      - ACCEPT_EULA=Y\n#    ports:\n#      - \"1433:1433\"\n"
  },
  {
    "path": "fizz.go",
    "content": "/*\nPackage fizz is a common DSL for writing SQL migrations\n*/\npackage fizz\n\nimport (\n\t\"io\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"os/exec\"\n\n\tshellquote \"github.com/kballard/go-shellquote\"\n)\n\n// Options is a generic map of options.\ntype Options map[string]interface{}\n\ntype fizzer struct {\n\tBubbler *Bubbler\n}\n\nfunc (f fizzer) add(s string, err error) error {\n\tif err != nil {\n\t\treturn err\n\t}\n\tf.Bubbler.data = append(f.Bubbler.data, s)\n\treturn nil\n}\n\nfunc (f fizzer) Exec(out io.Writer) func(string) error {\n\treturn func(s string) error {\n\t\targs, err := shellquote.Split(s)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcmd := exec.Command(args[0], args[1:]...)\n\t\tcmd.Stdin = os.Stdin\n\t\tcmd.Stdout = out\n\t\tcmd.Stderr = os.Stderr\n\t\terr = cmd.Run()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t}\n}\n\n// AFile reads in a fizz migration from an io.Reader and translates its contents to SQL.\nfunc AFile(f io.Reader, t Translator) (string, error) {\n\tb, err := ioutil.ReadAll(f)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn AString(string(b), t)\n}\n\n// AString reads a fizz string, and translates its contents to SQL.\nfunc AString(s string, t Translator) (string, error) {\n\tb := NewBubbler(t)\n\treturn b.Bubble(s)\n}\n"
  },
  {
    "path": "foreign_keys.go",
    "content": "package fizz\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"sort\"\n\t\"strings\"\n)\n\ntype ForeignKeyRef struct {\n\tTable   string\n\tColumns []string\n}\n\ntype ForeignKey struct {\n\tName       string\n\tColumn     string\n\tReferences ForeignKeyRef\n\tOptions    Options\n}\n\nfunc (f ForeignKey) String() string {\n\trefs := fmt.Sprintf(`{\"%s\": [\"%s\"]}`, f.References.Table, strings.Join(f.References.Columns, `\", \"`))\n\tvar opts map[string]interface{}\n\tif f.Options == nil {\n\t\topts = make(map[string]interface{})\n\t} else {\n\t\topts = f.Options\n\t}\n\n\to := make([]string, 0, len(opts))\n\tfor k, v := range opts {\n\t\tvv, _ := json.Marshal(v)\n\t\to = append(o, fmt.Sprintf(\"%s: %s\", k, string(vv)))\n\t}\n\tsort.SliceStable(o, func(i, j int) bool { return o[i] < o[j] })\n\treturn fmt.Sprintf(`t.ForeignKey(\"%s\", %s, {%s})`, f.Column, refs, strings.Join(o, \", \"))\n}\n\nfunc (f fizzer) AddForeignKey(table string, column string, refs interface{}, options Options) error {\n\tfkr, err := parseForeignKeyRef(refs)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfk := ForeignKey{\n\t\tColumn:     column,\n\t\tReferences: fkr,\n\t\tOptions:    options,\n\t}\n\n\tif options[\"name\"] != nil {\n\t\tvar ok bool\n\t\tfk.Name, ok = options[\"name\"].(string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(`expected options field \"name\" to be of type \"string\" but got \"%T\"`, options[\"name\"])\n\t\t}\n\t} else {\n\t\tfk.Name = fmt.Sprintf(\"%s_%s_%s_fk\", table, fk.References.Table, strings.Join(fk.References.Columns, \"_\"))\n\t}\n\n\treturn f.add(f.Bubbler.AddForeignKey(Table{\n\t\tName:        table,\n\t\tForeignKeys: []ForeignKey{fk},\n\t}))\n}\n\nfunc (f fizzer) DropForeignKey(table string, fk string, options Options) error {\n\treturn f.add(f.Bubbler.DropForeignKey(Table{\n\t\tName: table,\n\t\tForeignKeys: []ForeignKey{\n\t\t\t{\n\t\t\t\tName:    fk,\n\t\t\t\tOptions: options,\n\t\t\t},\n\t\t},\n\t}))\n}\n\nfunc parseForeignKeyRef(refs interface{}) (ForeignKeyRef, error) {\n\tfkr := ForeignKeyRef{}\n\trefMap, ok := refs.(map[string]interface{})\n\tif !ok {\n\t\treturn fkr, fmt.Errorf(`invalid references format %s\\nmust be \"{\"table\": [\"colum1\", \"column2\"]}\"`, refs)\n\t}\n\tif len(refMap) != 1 {\n\t\treturn fkr, fmt.Errorf(\"only one table is supported as Foreign key reference\")\n\t}\n\tfor table, columns := range refMap {\n\t\tfkr.Table = table\n\t\tfor _, c := range columns.([]interface{}) {\n\t\t\tfkr.Columns = append(fkr.Columns, fmt.Sprintf(\"%s\", c))\n\t\t}\n\t}\n\n\treturn fkr, nil\n}\n"
  },
  {
    "path": "go.mod",
    "content": "module github.com/gobuffalo/fizz\n\ngo 1.16\n\nrequire (\n\tgithub.com/Masterminds/semver/v3 v3.1.1\n\tgithub.com/go-sql-driver/mysql v1.6.0\n\tgithub.com/gobuffalo/plush/v4 v4.1.16\n\tgithub.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51\n\tgithub.com/stretchr/testify v1.8.0\n)\n"
  },
  {
    "path": "go.sum",
    "content": "github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=\ngithub.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=\ngithub.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=\ngithub.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=\ngithub.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=\ngithub.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=\ngithub.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=\ngithub.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=\ngithub.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=\ngithub.com/gobuffalo/flect v0.3.0 h1:erfPWM+K1rFNIQeRPdeEXxo8yFr/PO17lhRnS8FUrtk=\ngithub.com/gobuffalo/flect v0.3.0/go.mod h1:5pf3aGnsvqvCj50AVni7mJJF8ICxGZ8HomberC3pXLE=\ngithub.com/gobuffalo/github_flavored_markdown v1.1.3 h1:rSMPtx9ePkFB22vJ+dH+m/EUBS8doQ3S8LeEXcdwZHk=\ngithub.com/gobuffalo/github_flavored_markdown v1.1.3/go.mod h1:IzgO5xS6hqkDmUh91BW/+Qxo/qYnvfzoz3A7uLkg77I=\ngithub.com/gobuffalo/helpers v0.6.7 h1:C9CedoRSfgWg2ZoIkVXgjI5kgmSpL34Z3qdnzpfNVd8=\ngithub.com/gobuffalo/helpers v0.6.7/go.mod h1:j0u1iC1VqlCaJEEVkZN8Ia3TEzfj/zoXANqyJExTMTA=\ngithub.com/gobuffalo/plush/v4 v4.1.16 h1:Y6jVVTLdg1BxRXDIbTJz+J8QRzEAtv5ZwYpGdIFR7VU=\ngithub.com/gobuffalo/plush/v4 v4.1.16/go.mod h1:6t7swVsarJ8qSLw1qyAH/KbrcSTwdun2ASEQkOznakg=\ngithub.com/gobuffalo/tags/v3 v3.1.4 h1:X/ydLLPhgXV4h04Hp2xlbI2oc5MDaa7eub6zw8oHjsM=\ngithub.com/gobuffalo/tags/v3 v3.1.4/go.mod h1:ArRNo3ErlHO8BtdA0REaZxijuWnWzF6PUXngmMXd2I0=\ngithub.com/gobuffalo/validate/v3 v3.3.3 h1:o7wkIGSvZBYBd6ChQoLxkz2y1pfmhbI4jNJYh6PuNJ4=\ngithub.com/gobuffalo/validate/v3 v3.3.3/go.mod h1:YC7FsbJ/9hW/VjQdmXPvFqvRis4vrRYFxr69WiNZw6g=\ngithub.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0=\ngithub.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=\ngithub.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY=\ngithub.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c=\ngithub.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=\ngithub.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=\ngithub.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=\ngithub.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=\ngithub.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=\ngithub.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=\ngithub.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=\ngithub.com/microcosm-cc/bluemonday v1.0.20 h1:flpzsq4KU3QIYAYGV/szUat7H+GPOXR0B2JU5A1Wp8Y=\ngithub.com/microcosm-cc/bluemonday v1.0.20/go.mod h1:yfBmMi8mxvaZut3Yytv+jTXRY8mxyjJ0/kQBTElld50=\ngithub.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=\ngithub.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=\ngithub.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=\ngithub.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d h1:yKm7XZV6j9Ev6lojP2XaIshpT4ymkqhMeSghO5Ps00E=\ngithub.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE=\ngithub.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e h1:qpG93cPwA5f7s/ZPBJnGOYQNK/vKsaDaseuKT5Asee8=\ngithub.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA=\ngithub.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=\ngithub.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=\ngithub.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=\ngithub.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=\ngolang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=\ngolang.org/x/net v0.0.0-20221002022538-bcab6841153b h1:6e93nYa3hNqAvLr0pD4PN1fFS+gKzp2zAXqrnTCstqU=\ngolang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=\ngolang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0 h1:cu5kTvlzcw1Q5S9f5ip1/cpiB4nXvw1XYzFPGgzLUOY=\ngolang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=\ngolang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=\ngolang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=\ngopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=\ngopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=\ngopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\n"
  },
  {
    "path": "index.go",
    "content": "package fizz\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"sort\"\n\t\"strings\"\n)\n\n// Index is the index definition for fizz.\ntype Index struct {\n\tName    string\n\tColumns []string\n\tUnique  bool\n\tOptions Options\n}\n\nfunc (i Index) String() string {\n\tvar opts map[string]interface{}\n\tif i.Options == nil {\n\t\topts = make(map[string]interface{})\n\t} else {\n\t\topts = i.Options\n\t}\n\tif i.Name != \"\" {\n\t\topts[\"name\"] = i.Name\n\t}\n\tif i.Unique {\n\t\topts[\"unique\"] = true\n\t}\n\to := make([]string, 0, len(opts))\n\tfor k, v := range opts {\n\t\tvv, _ := json.Marshal(v)\n\t\to = append(o, fmt.Sprintf(\"%s: %s\", k, string(vv)))\n\t}\n\tsort.SliceStable(o, func(i, j int) bool { return o[i] < o[j] })\n\tif len(i.Columns) > 1 {\n\t\tcols := make([]string, len(i.Columns))\n\t\tfor k, v := range i.Columns {\n\t\t\tcols[k] = `\"` + v + `\"`\n\t\t}\n\t\treturn fmt.Sprintf(`t.Index([%s], {%s})`, strings.Join(cols, \", \"), strings.Join(o, \", \"))\n\t}\n\treturn fmt.Sprintf(`t.Index(\"%s\", {%s})`, i.Columns[0], strings.Join(o, \", \"))\n}\n\nfunc (f fizzer) AddIndex(table string, columns interface{}, options Options) error {\n\tt := NewTable(table, nil)\n\tif err := t.Index(columns, options); err != nil {\n\t\treturn err\n\t}\n\treturn f.add(f.Bubbler.AddIndex(t))\n}\n\nfunc (f fizzer) DropIndex(table, name string) error {\n\treturn f.add(f.Bubbler.DropIndex(Table{\n\t\tName: table,\n\t\tIndexes: []Index{\n\t\t\t{Name: name},\n\t\t},\n\t}))\n}\n\nfunc (f fizzer) RenameIndex(table, old, new string) error {\n\treturn f.add(f.Bubbler.RenameIndex(Table{\n\t\tName: table,\n\t\tIndexes: []Index{\n\t\t\t{Name: old},\n\t\t\t{Name: new},\n\t\t},\n\t}))\n}\n"
  },
  {
    "path": "raw_sql.go",
    "content": "package fizz\n\nimport (\n\t\"strings\"\n)\n\nfunc (f fizzer) RawSQL(sql string) error {\n\tif !strings.HasSuffix(sql, \";\") {\n\t\tsql += \";\"\n\t}\n\treturn f.add(sql, nil)\n}\n\n// Deprecated: use RawSQL instead.\nfunc (f fizzer) RawSql(sql string) error {\n\treturn f.RawSQL(sql)\n}\n"
  },
  {
    "path": "tables.go",
    "content": "package fizz\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"sort\"\n\t\"strings\"\n\n\t\"github.com/gobuffalo/plush/v4\"\n)\n\n// Table is the table definition for fizz.\ntype Table struct {\n\tName              string `db:\"name\"`\n\tColumns           []Column\n\tIndexes           []Index\n\tForeignKeys       []ForeignKey\n\tprimaryKeys       []string\n\tOptions           map[string]interface{}\n\tcolumnsCache      map[string]struct{}\n\tuseTimestampMacro bool\n}\n\nfunc (t Table) String() string {\n\treturn t.Fizz()\n}\n\n// Fizz returns the fizz DDL to create the table.\nfunc (t Table) Fizz() string {\n\tvar buff bytes.Buffer\n\ttimestampsOpt, _ := t.Options[\"timestamps\"].(bool)\n\t// Write table options\n\to := make([]string, 0, len(t.Options))\n\tfor k, v := range t.Options {\n\t\t// Special handling for timestamps option\n\t\tif k == \"timestamps\" {\n\t\t\tcontinue\n\t\t}\n\t\tvv, _ := json.Marshal(v)\n\t\to = append(o, fmt.Sprintf(\"%s: %s\", k, string(vv)))\n\t}\n\tif len(o) > 0 {\n\t\tsort.SliceStable(o, func(i, j int) bool { return o[i] < o[j] })\n\t\tbuff.WriteString(fmt.Sprintf(\"create_table(\\\"%s\\\", {%s}) {\\n\", t.Name, strings.Join(o, \", \")))\n\t} else {\n\t\tbuff.WriteString(fmt.Sprintf(\"create_table(\\\"%s\\\") {\\n\", t.Name))\n\t}\n\t// Write columns\n\tif t.useTimestampMacro {\n\t\tfor _, c := range t.Columns {\n\t\t\tif c.Name == \"created_at\" || c.Name == \"updated_at\" {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tbuff.WriteString(fmt.Sprintf(\"\\t%s\\n\", c.String()))\n\t\t}\n\t} else {\n\t\tfor _, c := range t.Columns {\n\t\t\tbuff.WriteString(fmt.Sprintf(\"\\t%s\\n\", c.String()))\n\t\t}\n\t}\n\tif t.useTimestampMacro {\n\t\tbuff.WriteString(\"\\tt.Timestamps()\\n\")\n\t} else if timestampsOpt {\n\t\t// Missing timestamp columns will only be added on fizz execution, so we need to consider them as present.\n\t\tif !t.HasColumns(\"created_at\") {\n\t\t\tbuff.WriteString(fmt.Sprintf(\"\\t%s\\n\", CREATED_COL.String()))\n\t\t}\n\t\tif !t.HasColumns(\"updated_at\") {\n\t\t\tbuff.WriteString(fmt.Sprintf(\"\\t%s\\n\", UPDATED_COL.String()))\n\t\t}\n\t}\n\t// Write primary key (single column pk will be written in inline form as the column opt)\n\tif len(t.primaryKeys) > 1 {\n\t\tpks := make([]string, len(t.primaryKeys))\n\t\tfor i, pk := range t.primaryKeys {\n\t\t\tpks[i] = fmt.Sprintf(\"\\\"%s\\\"\", pk)\n\t\t}\n\t\tbuff.WriteString(fmt.Sprintf(\"\\tt.PrimaryKey(%s)\\n\", strings.Join(pks, \", \")))\n\t}\n\t// Write indexes\n\tfor _, i := range t.Indexes {\n\t\tbuff.WriteString(fmt.Sprintf(\"\\t%s\\n\", i.String()))\n\t}\n\t// Write foreign keys\n\tfor _, fk := range t.ForeignKeys {\n\t\tbuff.WriteString(fmt.Sprintf(\"\\t%s\\n\", fk.String()))\n\t}\n\tbuff.WriteString(\"}\")\n\treturn buff.String()\n}\n\n// UnFizz returns the fizz DDL to remove the table.\nfunc (t Table) UnFizz() string {\n\treturn fmt.Sprintf(\"drop_table(\\\"%s\\\")\", t.Name)\n}\n\nfunc (t *Table) DisableTimestamps() {\n\tt.Options[\"timestamps\"] = false\n}\n\n// Column adds a column to the table definition.\nfunc (t *Table) Column(name string, colType string, options Options) error {\n\tif _, found := t.columnsCache[name]; found {\n\t\treturn fmt.Errorf(\"duplicated column %s\", name)\n\t}\n\tvar primary bool\n\tif _, ok := options[\"primary\"]; ok {\n\t\tif t.primaryKeys != nil {\n\t\t\treturn errors.New(\"could not define multiple primary keys\")\n\t\t}\n\t\tprimary = true\n\t\tt.primaryKeys = []string{name}\n\t}\n\tc := Column{\n\t\tName:    name,\n\t\tColType: colType,\n\t\tOptions: options,\n\t\tPrimary: primary,\n\t}\n\tif t.columnsCache == nil {\n\t\tt.columnsCache = make(map[string]struct{})\n\t}\n\tt.columnsCache[name] = struct{}{}\n\t// Ensure id is first\n\tif name == \"id\" {\n\t\tt.Columns = append([]Column{c}, t.Columns...)\n\t} else {\n\t\tt.Columns = append(t.Columns, c)\n\t}\n\tif (name == \"created_at\" || name == \"updated_at\") && colType != \"timestamp\" {\n\t\t// timestamp macro only works for time type\n\t\tt.useTimestampMacro = false\n\t}\n\treturn nil\n}\n\n// ForeignKey adds a new foreign key to the table definition.\nfunc (t *Table) ForeignKey(column string, refs interface{}, options Options) error {\n\tfkr, err := parseForeignKeyRef(refs)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfk := ForeignKey{\n\t\tColumn:     column,\n\t\tReferences: fkr,\n\t\tOptions:    options,\n\t}\n\n\tif options[\"name\"] != nil {\n\t\tvar ok bool\n\t\tfk.Name, ok = options[\"name\"].(string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(`expected options field \"name\" to be of type \"string\" but got \"%T\"`, options[\"name\"])\n\t\t}\n\t} else {\n\t\tfk.Name = fmt.Sprintf(\"%s_%s_%s_fk\", t.Name, fk.References.Table, strings.Join(fk.References.Columns, \"_\"))\n\t}\n\n\tt.ForeignKeys = append(t.ForeignKeys, fk)\n\treturn nil\n}\n\n// Index adds a new index to the table definition.\nfunc (t *Table) Index(columns interface{}, options Options) error {\n\ti := Index{}\n\tswitch tp := columns.(type) {\n\tdefault:\n\t\treturn fmt.Errorf(\"unexpected type %T for %s index columns\", tp, t.Name) // %T prints whatever type t has\n\tcase string:\n\t\ti.Columns = []string{tp}\n\tcase []string:\n\t\tif len(tp) == 0 {\n\t\t\treturn fmt.Errorf(\"expected at least one column to apply %s index\", t.Name)\n\t\t}\n\t\ti.Columns = tp\n\tcase []interface{}:\n\t\tif len(tp) == 0 {\n\t\t\treturn fmt.Errorf(\"expected at least one column to apply %s index\", t.Name)\n\t\t}\n\t\tcl := make([]string, len(tp))\n\t\tfor i, c := range tp {\n\t\t\tvar ok bool\n\t\t\tcl[i], ok = c.(string)\n\t\t\tif !ok {\n\t\t\t\treturn fmt.Errorf(`expected variable to be of type \"string\" but got \"%T\"`, c)\n\t\t\t}\n\t\t}\n\t\ti.Columns = cl\n\t}\n\tif options[\"name\"] != nil {\n\t\tvar ok bool\n\t\ti.Name, ok = options[\"name\"].(string)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(`expected options field \"name\" to be of type \"string\" but got \"%T\"`, options[\"name\"])\n\t\t}\n\t} else {\n\t\ti.Name = fmt.Sprintf(\"%s_%s_idx\", t.Name, strings.Join(i.Columns, \"_\"))\n\t}\n\n\tunique, _ := options[\"unique\"].(bool)\n\ti.Unique = unique\n\n\tt.Indexes = append(t.Indexes, i)\n\treturn nil\n}\n\n// Timestamp is a shortcut to add a timestamp column with default options.\nfunc (t *Table) Timestamp(name string) error {\n\treturn t.Column(name, \"timestamp\", Options{})\n}\n\n// Timestamps adds created_at and updated_at columns to the Table definition.\nfunc (t *Table) Timestamps() error {\n\tif err := t.Timestamp(\"created_at\"); err != nil {\n\t\treturn err\n\t}\n\treturn t.Timestamp(\"updated_at\")\n}\n\n// PrimaryKey adds a primary key to the table. It's useful to define a composite\n// primary key.\nfunc (t *Table) PrimaryKey(pk ...string) error {\n\tif len(pk) == 0 {\n\t\treturn errors.New(\"missing columns for primary key\")\n\t}\n\tif t.primaryKeys != nil {\n\t\treturn errors.New(\"duplicate primary key\")\n\t}\n\tif !t.HasColumns(pk...) {\n\t\treturn errors.New(\"columns must be declared before the primary key\")\n\t}\n\tif len(pk) == 1 {\n\t\tfor i, c := range t.Columns {\n\t\t\tif c.Name == pk[0] {\n\t\t\t\tt.Columns[i].Primary = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\tt.primaryKeys = make([]string, 0)\n\tt.primaryKeys = append(t.primaryKeys, pk...)\n\treturn nil\n}\n\n// PrimaryKeys gets the list of registered primary key fields.\nfunc (t *Table) PrimaryKeys() []string {\n\treturn t.primaryKeys\n}\n\n// ColumnNames returns the names of the Table's columns.\nfunc (t *Table) ColumnNames() []string {\n\tcols := make([]string, len(t.Columns))\n\tfor i, c := range t.Columns {\n\t\tcols[i] = c.Name\n\t}\n\treturn cols\n}\n\n// HasColumns checks if the Table has all the given columns.\nfunc (t *Table) HasColumns(args ...string) bool {\n\tfor _, a := range args {\n\t\tif _, ok := t.columnsCache[a]; !ok {\n\t\t\t// Just because the cache couldn't find the column doesn't mean it's not there.\n\t\t\t// Let's see if it really doesn't exist!\n\t\t\tvar found bool\n\t\t\tfor _, name := range t.ColumnNames() {\n\t\t\t\tif found = name == a; found {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn found\n\t\t}\n\t}\n\treturn true\n}\n\n// NewTable creates a new Table.\nfunc NewTable(name string, opts map[string]interface{}) Table {\n\tif opts == nil {\n\t\topts = make(map[string]interface{})\n\t}\n\t// auto-timestamp as default\n\tif enabled, exists := opts[\"timestamps\"]; !exists || enabled == true {\n\t\topts[\"timestamps\"] = true\n\t}\n\tuseTimestampMacro, _ := opts[\"timestamps\"].(bool)\n\treturn Table{\n\t\tName:              name,\n\t\tColumns:           []Column{},\n\t\tIndexes:           []Index{},\n\t\tOptions:           opts,\n\t\tcolumnsCache:      map[string]struct{}{},\n\t\tuseTimestampMacro: useTimestampMacro,\n\t}\n}\n\nfunc (f fizzer) CreateTable(name string, opts map[string]interface{}, help plush.HelperContext) error {\n\tt := NewTable(name, opts)\n\tif help.HasBlock() {\n\t\tctx := help.Context.New()\n\t\tctx.Set(\"t\", &t)\n\t\tif _, err := help.BlockWith(ctx); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tif t.Options[\"timestamps\"].(bool) {\n\t\tif !t.HasColumns(\"created_at\") {\n\t\t\tif err := t.Timestamp(\"created_at\"); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tif !t.HasColumns(\"updated_at\") {\n\t\t\tif err := t.Timestamp(\"updated_at\"); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn f.add(f.Bubbler.CreateTable(t))\n}\n\nfunc (f fizzer) DropTable(name string) error {\n\treturn f.add(f.Bubbler.DropTable(Table{Name: name}))\n}\n\nfunc (f fizzer) RenameTable(old, new string) error {\n\treturn f.add(f.Bubbler.RenameTable([]Table{\n\t\t{Name: old},\n\t\t{Name: new},\n\t}))\n}\n"
  },
  {
    "path": "tables_private_test.go",
    "content": "package fizz\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc Test_Table_HasColumnNoCache(t *testing.T) {\n\tr := require.New(t)\n\ttable := NewTable(\"users\", nil)\n\tr.NoError(table.Column(\"firstname\", \"string\", nil))\n\tr.NoError(table.Column(\"lastname\", \"string\", nil))\n\ttable.columnsCache = map[string]struct{}{}\n\tr.True(table.HasColumns(\"firstname\", \"lastname\"))\n\tr.False(table.HasColumns(\"age\"))\n}\n"
  },
  {
    "path": "tables_test.go",
    "content": "package fizz_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/gobuffalo/fizz\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc Test_Table_Stringer(t *testing.T) {\n\tr := require.New(t)\n\n\texpected :=\n\t\t`create_table(\"users\") {\n\tt.Column(\"name\", \"string\")\n\tt.Column(\"alive\", \"boolean\", {null: true})\n\tt.Column(\"birth_date\", \"timestamp\", {null: true})\n\tt.Column(\"bio\", \"text\", {null: true})\n\tt.Column(\"price\", \"numeric\", {default: \"1.00\", null: true})\n\tt.Column(\"email\", \"string\", {default: \"foo@example.com\", size: 50})\n\tt.Timestamps()\n}`\n\n\ttable := fizz.NewTable(\"users\", nil)\n\tr.NoError(table.Column(\"name\", \"string\", nil))\n\tr.NoError(table.Column(\"alive\", \"boolean\", fizz.Options{\n\t\t\"null\": true,\n\t}))\n\tr.NoError(table.Column(\"birth_date\", \"timestamp\", fizz.Options{\n\t\t\"null\": true,\n\t}))\n\tr.NoError(table.Column(\"bio\", \"text\", fizz.Options{\n\t\t\"null\": true,\n\t}))\n\tr.NoError(table.Column(\"price\", \"numeric\", fizz.Options{\n\t\t\"null\":    true,\n\t\t\"default\": \"1.00\",\n\t}))\n\tr.NoError(table.Column(\"email\", \"string\", fizz.Options{\n\t\t\"size\":    50,\n\t\t\"default\": \"foo@example.com\",\n\t}))\n\n\tr.Equal(expected, table.String())\n}\n\nfunc Test_Table_StringerOpts(t *testing.T) {\n\tr := require.New(t)\n\n\t// Timestamps\n\texpected :=\n\t\t`create_table(\"users\") {\n\tt.Column(\"name\", \"string\")\n\tt.Timestamps()\n}`\n\n\ttable := fizz.NewTable(\"users\", map[string]interface{}{\n\t\t\"timestamps\": true,\n\t})\n\tr.NoError(table.Column(\"name\", \"string\", nil))\n\n\tr.Equal(expected, table.String())\n\n\t// Random option\n\texpected =\n\t\t`create_table(\"users\", {myopt: \"test\"}) {\n\tt.Column(\"name\", \"string\")\n\tt.Timestamps()\n}`\n\n\ttable = fizz.NewTable(\"users\", map[string]interface{}{\n\t\t\"myopt\": \"test\",\n\t})\n\tr.NoError(table.Column(\"name\", \"string\", nil))\n\n\tr.Equal(expected, table.String())\n}\n\nfunc Test_Table_StringerAutoDisableTimestamps(t *testing.T) {\n\tr := require.New(t)\n\n\t// Custom type timestamps\n\texpected :=\n\t\t`create_table(\"users\") {\n\tt.Column(\"name\", \"string\")\n\tt.Column(\"created_at\", \"int\")\n\tt.Column(\"updated_at\", \"int\")\n}`\n\n\ttable := fizz.NewTable(\"users\", map[string]interface{}{\n\t\t\"timestamps\": true,\n\t})\n\tr.NoError(table.Column(\"name\", \"string\", nil))\n\tr.NoError(table.Column(\"created_at\", \"int\", nil))\n\tr.NoError(table.Column(\"updated_at\", \"int\", nil))\n\n\tr.Equal(expected, table.String())\n\n\t// only one timestamp override\n\texpected =\n\t\t`create_table(\"users\") {\n\tt.Column(\"name\", \"string\")\n\tt.Column(\"created_at\", \"int\")\n\tt.Column(\"updated_at\", \"timestamp\")\n}`\n\n\ttable = fizz.NewTable(\"users\", map[string]interface{}{\n\t\t\"timestamps\": true,\n\t})\n\tr.NoError(table.Column(\"name\", \"string\", nil))\n\tr.NoError(table.Column(\"created_at\", \"int\", nil))\n\n\tr.Equal(expected, table.String())\n\n\t// timestamp columns provided but same as default\n\texpected =\n\t\t`create_table(\"users\") {\n\tt.Column(\"name\", \"string\")\n\tt.Timestamps()\n}`\n\n\ttable = fizz.NewTable(\"users\", map[string]interface{}{\n\t\t\"timestamps\": true,\n\t})\n\tr.NoError(table.Column(\"name\", \"string\", nil))\n\tr.NoError(table.Column(\"created_at\", \"timestamp\", nil))\n\tr.NoError(table.Column(\"updated_at\", \"timestamp\", nil))\n\n\tr.Equal(expected, table.String())\n}\n\nfunc Test_Table_StringerIndex(t *testing.T) {\n\tr := require.New(t)\n\n\t// Single column index\n\texpected :=\n\t\t`create_table(\"users\") {\n\tt.Column(\"name\", \"string\")\n\tt.Column(\"email\", \"string\")\n\tt.Timestamps()\n\tt.Index(\"email\", {name: \"users_email_idx\", unique: true})\n}`\n\n\ttable := fizz.NewTable(\"users\", nil)\n\tr.NoError(table.Column(\"name\", \"string\", nil))\n\tr.NoError(table.Column(\"email\", \"string\", nil))\n\tr.NoError(table.Index(\"email\", fizz.Options{\n\t\t\"unique\": true,\n\t}))\n\n\tr.Equal(expected, table.String())\n\n\t// Multiple-column index\n\texpected =\n\t\t`create_table(\"users\") {\n\tt.Column(\"name\", \"string\")\n\tt.Column(\"email\", \"string\")\n\tt.Timestamps()\n\tt.Index([\"name\", \"email\"], {name: \"users_name_email_idx\"})\n}`\n\n\ttable = fizz.NewTable(\"users\", nil)\n\tr.NoError(table.Column(\"name\", \"string\", nil))\n\tr.NoError(table.Column(\"email\", \"string\", nil))\n\tr.NoError(table.Index([]string{\"name\", \"email\"}, nil))\n\n\tr.Equal(expected, table.String())\n}\n\nfunc Test_Table_StringerForeignKey(t *testing.T) {\n\tr := require.New(t)\n\n\t// Single column\n\texpected :=\n\t\t`create_table(\"users_color\") {\n\tt.Column(\"name\", \"string\")\n\tt.Column(\"user_id\", \"int\")\n\tt.Timestamps()\n\tt.ForeignKey(\"user_id\", {\"users\": [\"id\"]}, {on_delete: \"cascade\"})\n}`\n\n\ttable := fizz.NewTable(\"users_color\", nil)\n\tr.NoError(table.Column(\"name\", \"string\", nil))\n\tr.NoError(table.Column(\"user_id\", \"int\", nil))\n\tr.NoError(table.ForeignKey(\"user_id\",\n\t\tmap[string]interface{}{\n\t\t\t\"users\": []interface{}{\"id\"},\n\t\t},\n\t\tfizz.Options{\n\t\t\t\"on_delete\": \"cascade\",\n\t\t}))\n\n\tr.Equal(expected, table.String())\n\n\t// Multiple columns\n\texpected =\n\t\t`create_table(\"users_color\") {\n\tt.Column(\"name\", \"string\")\n\tt.Column(\"user_id\", \"int\")\n\tt.Timestamps()\n\tt.ForeignKey(\"user_id\", {\"users\": [\"id\", \"id2\"]}, {on_delete: \"cascade\", on_update: \"restrict\"})\n}`\n\n\ttable = fizz.NewTable(\"users_color\", nil)\n\tr.NoError(table.Column(\"name\", \"string\", nil))\n\tr.NoError(table.Column(\"user_id\", \"int\", nil))\n\tr.NoError(table.ForeignKey(\"user_id\",\n\t\tmap[string]interface{}{\n\t\t\t\"users\": []interface{}{\"id\", \"id2\"},\n\t\t},\n\t\tfizz.Options{\n\t\t\t\"on_delete\": \"cascade\",\n\t\t\t\"on_update\": \"restrict\",\n\t\t}))\n\n\tr.Equal(expected, table.String())\n}\n\nfunc Test_Table_UnFizz(t *testing.T) {\n\tr := require.New(t)\n\ttable := fizz.NewTable(\"users\", nil)\n\tr.Equal(`drop_table(\"users\")`, table.UnFizz())\n}\n\nfunc Test_Table_HasColumn(t *testing.T) {\n\tr := require.New(t)\n\ttable := fizz.NewTable(\"users\", nil)\n\tr.NoError(table.Column(\"firstname\", \"string\", nil))\n\tr.NoError(table.Column(\"lastname\", \"string\", nil))\n\tr.True(table.HasColumns(\"firstname\", \"lastname\"))\n\tr.False(table.HasColumns(\"age\"))\n}\n\nfunc Test_Table_ColumnNames(t *testing.T) {\n\tr := require.New(t)\n\ttable := fizz.NewTable(\"users\", nil)\n\tr.NoError(table.Column(\"firstname\", \"string\", nil))\n\tr.NoError(table.Column(\"lastname\", \"string\", nil))\n\tr.Equal([]string{\"firstname\", \"lastname\"}, table.ColumnNames())\n}\n\nfunc Test_Table_DuplicateColumn(t *testing.T) {\n\tr := require.New(t)\n\ttable := fizz.NewTable(\"users\", map[string]interface{}{})\n\tr.NoError(table.Column(\"name\", \"string\", fizz.Options{}))\n\tr.Error(table.Column(\"name\", \"string\", fizz.Options{}))\n\tr.Error(table.Column(\"name\", \"string\", fizz.Options{\n\t\t\"null\": true,\n\t}))\n}\n\nfunc Test_Table_AddEmptyIndex(t *testing.T) {\n\tr := require.New(t)\n\t// Empty index\n\ttable := fizz.NewTable(\"users\", nil)\n\tr.NoError(table.Column(\"name\", \"string\", nil))\n\tr.NoError(table.Column(\"email\", \"string\", nil))\n\tr.Error(table.Index([]string{}, nil))\n}\n\nfunc Test_Table_AddPrimaryKey(t *testing.T) {\n\tr := require.New(t)\n\n\t// Add single primary key\n\texpected :=\n\t\t`create_table(\"users\") {\n\tt.Column(\"id\", \"int\", {primary: true})\n\tt.Column(\"name\", \"string\")\n\tt.Column(\"email\", \"string\")\n\tt.Timestamps()\n}`\n\ttable := fizz.NewTable(\"users\", nil)\n\tr.NoError(table.Column(\"id\", \"int\", fizz.Options{\"primary\": true}))\n\tr.NoError(table.Column(\"name\", \"string\", nil))\n\tr.NoError(table.Column(\"email\", \"string\", nil))\n\tr.Equal(expected, table.String())\n\n\ttable = fizz.NewTable(\"users\", nil)\n\tr.NoError(table.Column(\"id\", \"int\", nil))\n\tr.NoError(table.Column(\"name\", \"string\", nil))\n\tr.NoError(table.Column(\"email\", \"string\", nil))\n\tr.NoError(table.PrimaryKey(\"id\"))\n\tr.Equal(expected, table.String())\n\n\t// Add composite primary key\n\texpected =\n\t\t`create_table(\"user_privileges\") {\n\tt.Column(\"user_id\", \"int\")\n\tt.Column(\"privilege_id\", \"int\")\n\tt.Timestamps()\n\tt.PrimaryKey(\"user_id\", \"privilege_id\")\n}`\n\ttable = fizz.NewTable(\"user_privileges\", nil)\n\tr.NoError(table.Column(\"user_id\", \"int\", nil))\n\tr.NoError(table.Column(\"privilege_id\", \"int\", nil))\n\tr.NoError(table.PrimaryKey(\"user_id\", \"privilege_id\"))\n\tr.Equal(expected, table.String())\n}\n\nfunc Test_Table_AddPrimaryKey_Errors(t *testing.T) {\n\tr := require.New(t)\n\n\t// Primary key on unknown column\n\ttable := fizz.NewTable(\"users\", nil)\n\tr.NoError(table.Column(\"id\", \"int\", nil))\n\tr.Error(table.PrimaryKey(\"id2\"))\n\n\t// Duplicate primary key\n\ttable = fizz.NewTable(\"users\", nil)\n\tr.NoError(table.Column(\"id\", \"int\", nil))\n\tr.NoError(table.PrimaryKey(\"id\"))\n\tr.Error(table.PrimaryKey(\"id\"))\n\n\t// Duplicate primary key\n\ttable = fizz.NewTable(\"users\", nil)\n\tr.NoError(table.Column(\"id\", \"int\", fizz.Options{\"primary\": true}))\n\tr.Error(table.PrimaryKey(\"id\"))\n\n\t// Duplicate inline primary key\n\ttable = fizz.NewTable(\"users\", nil)\n\tr.NoError(table.Column(\"id\", \"int\", fizz.Options{\"primary\": true}))\n\tr.Error(table.Column(\"id2\", \"int\", fizz.Options{\"primary\": true}))\n}\n"
  },
  {
    "path": "test.sh",
    "content": "#!/bin/bash\n\nset -e\n\n# NOTE: See also docker-compose.yml and database.yml to configure database\n# properties.\nexport MYSQL_PORT=3307\nexport COCKROACH_PORT=26258\n\nCOMPOSE=docker-compose\nwhich docker-compose || COMPOSE=\"docker compose\"\n\nargs=$@\n\nfunction cleanup {\n    echo \"Cleanup resources...\"\n    $COMPOSE down\n    docker volume prune -f\n    find ./tmp -name *.sqlite* -delete || true\n}\n# defer cleanup, so it will be executed even after premature exit\ntrap cleanup EXIT\n\nfunction test {\n  export SODA_DIALECT=$1\n\n  echo \"\"\n  echo \"######################################################################\"\n  echo \"### Running unit tests for $SODA_DIALECT\"\n  soda drop -e $SODA_DIALECT\n  soda create -e $SODA_DIALECT\n  soda migrate -e $SODA_DIALECT -p ./testdata/migrations\n  go test -tags sqlite -count=1 $args ./...\n\n  echo \"\"\n  echo \"######################################################################\"\n  echo \"### Running e2e tests for $1\"\n  soda drop -e $SODA_DIALECT\n  soda create -e $SODA_DIALECT\n  pushd testdata/e2e; go test -tags sqlite,e2e -count=1 $args ./...; popd\n}\n\n\n$COMPOSE up --wait\n\ngo install -tags sqlite github.com/gobuffalo/pop/v6/soda@latest\n\ntest \"sqlite\"\ntest \"postgres\"\ntest \"cockroach\"\ntest \"mysql\"\n\n# Does not appear to be implemented in pop:\n# test \"sqlserver\"\n"
  },
  {
    "path": "testdata/e2e/cockroach_test.go",
    "content": "package e2e_test\n\nimport (\n\t\"github.com/gobuffalo/pop/v6\"\n\t\"github.com/stretchr/testify/suite\"\n)\n\ntype CockroachSuite struct {\n\tsuite.Suite\n}\n\nfunc (s *CockroachSuite) Test_Cockroach_MigrationSteps() {\n\tr := s.Require()\n\n\tc, err := pop.Connect(\"cockroach\")\n\tr.NoError(err)\n\tr.NoError(retryOpen(c))\n\n\trun(&s.Suite, c, runTestData(&s.Suite, c, true))\n}\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/down/0.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # 1 row\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/down/1.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 247\nCREATE TABLE public.e2e_users (\n\tid UUID NOT NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tusername VARCHAR(255) NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, created_at, updated_at, username)\n);\n-- # 2 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/down/10.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 208\nCREATE TABLE public.e2e_users (\n\tid UUID NOT NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, created_at, updated_at)\n);\n-- # row 3\n-- ## 352\nCREATE TABLE public.e2e_user_posts (\n\tid UUID NOT NULL,\n\tcontent VARCHAR(255) NOT NULL DEFAULT '':::STRING,\n\tuser_id UUID NOT NULL,\n\tslug VARCHAR(64) NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tINDEX e2e_user_notes_user_id_idx (user_id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tFAMILY \"primary\" (id, content, user_id, slug)\n);\n-- # row 4\n-- ## 152\nALTER TABLE public.e2e_user_posts ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_posts VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/down/11.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 208\nCREATE TABLE public.e2e_users (\n\tid UUID NOT NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, created_at, updated_at)\n);\n-- # row 3\n-- ## 352\nCREATE TABLE public.e2e_user_posts (\n\tid UUID NOT NULL,\n\tcontent VARCHAR(255) NOT NULL DEFAULT '':::STRING,\n\tslug VARCHAR(32) NOT NULL,\n\tuser_id UUID NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tINDEX e2e_user_notes_user_id_idx (user_id ASC),\n\tFAMILY \"primary\" (id, content, slug, user_id)\n);\n-- # row 4\n-- ## 152\nALTER TABLE public.e2e_user_posts ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_posts VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/down/12.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 210\nCREATE TABLE public.e2e_authors (\n\tid UUID NOT NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, created_at, updated_at)\n);\n-- # row 3\n-- ## 352\nCREATE TABLE public.e2e_user_posts (\n\tid UUID NOT NULL,\n\tcontent VARCHAR(255) NOT NULL DEFAULT '':::STRING,\n\tslug VARCHAR(32) NOT NULL,\n\tuser_id UUID NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tINDEX e2e_user_notes_user_id_idx (user_id ASC),\n\tFAMILY \"primary\" (id, content, slug, user_id)\n);\n-- # row 4\n-- ## 154\nALTER TABLE public.e2e_user_posts ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (user_id) REFERENCES public.e2e_authors(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_posts VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/down/13.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 210\nCREATE TABLE public.e2e_authors (\n\tid UUID NOT NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, created_at, updated_at)\n);\n-- # row 3\n-- ## 358\nCREATE TABLE public.e2e_user_posts (\n\tid UUID NOT NULL,\n\tcontent VARCHAR(255) NOT NULL DEFAULT '':::STRING,\n\tslug VARCHAR(32) NOT NULL,\n\tauthor_id UUID NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tINDEX e2e_user_notes_user_id_idx (author_id ASC),\n\tFAMILY \"primary\" (id, content, slug, author_id)\n);\n-- # row 4\n-- ## 156\nALTER TABLE public.e2e_user_posts ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (author_id) REFERENCES public.e2e_authors(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_posts VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/down/14.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 210\nCREATE TABLE public.e2e_authors (\n\tid UUID NOT NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, created_at, updated_at)\n);\n-- # row 3\n-- ## 405\nCREATE TABLE public.e2e_user_posts (\n\tid UUID NOT NULL,\n\tcontent VARCHAR(255) NOT NULL DEFAULT '':::STRING,\n\tslug VARCHAR(32) NOT NULL,\n\tpublished BOOL NOT NULL DEFAULT false,\n\tauthor_id UUID NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tINDEX e2e_user_notes_user_id_idx (author_id ASC),\n\tFAMILY \"primary\" (id, content, slug, published, author_id)\n);\n-- # row 4\n-- ## 156\nALTER TABLE public.e2e_user_posts ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (author_id) REFERENCES public.e2e_authors(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_posts VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/down/15.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 210\nCREATE TABLE public.e2e_authors (\n\tid UUID NOT NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, created_at, updated_at)\n);\n-- # row 3\n-- ## 405\nCREATE TABLE public.e2e_user_posts (\n\tid UUID NOT NULL,\n\tcontent VARCHAR(255) NOT NULL DEFAULT '':::STRING,\n\tslug VARCHAR(32) NOT NULL,\n\tpublished BOOL NOT NULL DEFAULT false,\n\tauthor_id UUID NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tINDEX e2e_user_notes_user_id_idx (author_id ASC),\n\tFAMILY \"primary\" (id, content, slug, published, author_id)\n);\n-- # row 4\n-- ## 119\nCREATE TABLE public.e2e_flow (\n\tid UUID NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id)\n);\n-- # row 5\n-- ## 122\nCREATE TABLE public.e2e_address (\n\tid UUID NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id)\n);\n-- # row 6\n-- ## 492\nCREATE TABLE public.e2e_token (\n\tid UUID NOT NULL,\n\ttoken VARCHAR(64) NOT NULL,\n\te2e_address_id UUID NOT NULL,\n\texpires_at TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00':::TIMESTAMP,\n\tissued_at TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00':::TIMESTAMP,\n\te2e_flow_id UUID NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tUNIQUE INDEX e2e_token_uq_idx (token ASC),\n\tINDEX e2e_token_idx (token ASC),\n\tFAMILY \"primary\" (id, token, e2e_address_id, expires_at, issued_at, e2e_flow_id)\n);\n-- # row 7\n-- ## 156\nALTER TABLE public.e2e_user_posts ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (author_id) REFERENCES public.e2e_authors(id) ON DELETE CASCADE;\n-- # row 8\n-- ## 153\nALTER TABLE public.e2e_token ADD CONSTRAINT e2e_token_e2e_address_id_fk FOREIGN KEY (e2e_address_id) REFERENCES public.e2e_address(id) ON DELETE CASCADE;\n-- # row 9\n-- ## 144\nALTER TABLE public.e2e_token ADD CONSTRAINT e2e_token_e2e_flow_id_fk FOREIGN KEY (e2e_flow_id) REFERENCES public.e2e_flow(id) ON DELETE CASCADE;\n-- # row 10\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 11\n-- ## 85\nALTER TABLE public.e2e_user_posts VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # row 12\n-- ## 77\nALTER TABLE public.e2e_token VALIDATE CONSTRAINT e2e_token_e2e_address_id_fk;\n-- # row 13\n-- ## 74\nALTER TABLE public.e2e_token VALIDATE CONSTRAINT e2e_token_e2e_flow_id_fk;\n-- # 13 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/down/2.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 247\nCREATE TABLE public.e2e_users (\n\tid UUID NOT NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tusername VARCHAR(255) NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, created_at, updated_at, username)\n);\n-- # row 3\n-- ## 341\nCREATE TABLE public.e2e_user_notes (\n\tid UUID NOT NULL,\n\tuser_id UUID NOT NULL,\n\tnotes VARCHAR(255) NULL,\n\ttitle VARCHAR(64) NOT NULL DEFAULT '':::STRING,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tINDEX e2e_user_notes_user_id_idx (user_id ASC),\n\tINDEX e2e_user_notes_title_idx (title ASC),\n\tFAMILY \"primary\" (id, user_id, notes, title)\n);\n-- # row 4\n-- ## 152\nALTER TABLE public.e2e_user_notes ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_notes VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/down/3.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 247\nCREATE TABLE public.e2e_users (\n\tid UUID NOT NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tusername VARCHAR(255) NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, created_at, updated_at, username)\n);\n-- # row 3\n-- ## 240\nCREATE TABLE public.e2e_user_notes (\n\tid UUID NOT NULL,\n\tuser_id UUID NOT NULL,\n\tnotes VARCHAR(255) NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tINDEX e2e_user_notes_user_id_idx (user_id ASC),\n\tFAMILY \"primary\" (id, user_id, notes)\n);\n-- # row 4\n-- ## 152\nALTER TABLE public.e2e_user_notes ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_notes VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/down/4.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 247\nCREATE TABLE public.e2e_users (\n\tid UUID NOT NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tusername VARCHAR(255) NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, created_at, updated_at, username)\n);\n-- # row 3\n-- ## 324\nCREATE TABLE public.e2e_user_notes (\n\tid UUID NOT NULL,\n\tuser_id UUID NOT NULL,\n\tslug VARCHAR(64) NOT NULL,\n\tnotes VARCHAR(255) NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tINDEX e2e_user_notes_user_id_idx (user_id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tFAMILY \"primary\" (id, user_id, slug, notes)\n);\n-- # row 4\n-- ## 152\nALTER TABLE public.e2e_user_notes ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_notes VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/down/5.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 247\nCREATE TABLE public.e2e_users (\n\tid UUID NOT NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tusername VARCHAR(255) NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, created_at, updated_at, username)\n);\n-- # row 3\n-- ## 324\nCREATE TABLE public.e2e_user_notes (\n\tid UUID NOT NULL,\n\tuser_id UUID NOT NULL,\n\tslug VARCHAR(64) NOT NULL,\n\tnotes VARCHAR(255) NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tINDEX e2e_user_notes_user_id_idx (user_id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tFAMILY \"primary\" (id, user_id, slug, notes)\n);\n-- # row 4\n-- ## 152\nALTER TABLE public.e2e_user_notes ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_notes VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/down/6.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 247\nCREATE TABLE public.e2e_users (\n\tid UUID NOT NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tusername VARCHAR(255) NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, created_at, updated_at, username)\n);\n-- # row 3\n-- ## 324\nCREATE TABLE public.e2e_user_notes (\n\tid UUID NOT NULL,\n\tuser_id UUID NOT NULL,\n\tslug VARCHAR(64) NOT NULL,\n\tnotes VARCHAR(255) NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tINDEX e2e_user_notes_user_id_idx (user_id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tFAMILY \"primary\" (id, user_id, slug, notes)\n);\n-- # row 4\n-- ## 152\nALTER TABLE public.e2e_user_notes ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_notes VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/down/7.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 247\nCREATE TABLE public.e2e_users (\n\tid UUID NOT NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tusername VARCHAR(255) NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, created_at, updated_at, username)\n);\n-- # row 3\n-- ## 324\nCREATE TABLE public.e2e_user_posts (\n\tid UUID NOT NULL,\n\tuser_id UUID NOT NULL,\n\tslug VARCHAR(64) NOT NULL,\n\tnotes VARCHAR(255) NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tINDEX e2e_user_notes_user_id_idx (user_id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tFAMILY \"primary\" (id, user_id, slug, notes)\n);\n-- # row 4\n-- ## 152\nALTER TABLE public.e2e_user_posts ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_posts VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/down/8.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 247\nCREATE TABLE public.e2e_users (\n\tid UUID NOT NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tusername VARCHAR(255) NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, created_at, updated_at, username)\n);\n-- # row 3\n-- ## 352\nCREATE TABLE public.e2e_user_posts (\n\tid UUID NOT NULL,\n\tcontent VARCHAR(255) NOT NULL DEFAULT '':::STRING,\n\tuser_id UUID NOT NULL,\n\tslug VARCHAR(64) NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tINDEX e2e_user_notes_user_id_idx (user_id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tFAMILY \"primary\" (id, content, user_id, slug)\n);\n-- # row 4\n-- ## 152\nALTER TABLE public.e2e_user_posts ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_posts VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/down/9.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 239\nCREATE TABLE public.e2e_users (\n\tid UUID NOT NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tname VARCHAR(255) NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, created_at, updated_at, name)\n);\n-- # row 3\n-- ## 352\nCREATE TABLE public.e2e_user_posts (\n\tid UUID NOT NULL,\n\tcontent VARCHAR(255) NOT NULL DEFAULT '':::STRING,\n\tuser_id UUID NOT NULL,\n\tslug VARCHAR(64) NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tINDEX e2e_user_notes_user_id_idx (user_id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tFAMILY \"primary\" (id, content, user_id, slug)\n);\n-- # row 4\n-- ## 152\nALTER TABLE public.e2e_user_posts ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_posts VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/up/0.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 247\nCREATE TABLE public.e2e_users (\n\tid UUID NOT NULL,\n\tusername VARCHAR(255) NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, username, created_at, updated_at)\n);\n-- # 2 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/up/1.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 247\nCREATE TABLE public.e2e_users (\n\tid UUID NOT NULL,\n\tusername VARCHAR(255) NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, username, created_at, updated_at)\n);\n-- # row 3\n-- ## 341\nCREATE TABLE public.e2e_user_notes (\n\tid UUID NOT NULL,\n\tnotes VARCHAR(255) NULL,\n\ttitle VARCHAR(64) NOT NULL DEFAULT '':::STRING,\n\tuser_id UUID NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tINDEX e2e_user_notes_user_id_idx (user_id ASC),\n\tINDEX e2e_user_notes_title_idx (title ASC),\n\tFAMILY \"primary\" (id, notes, title, user_id)\n);\n-- # row 4\n-- ## 152\nALTER TABLE public.e2e_user_notes ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_notes VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/up/10.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 208\nCREATE TABLE public.e2e_users (\n\tid UUID NOT NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, created_at, updated_at)\n);\n-- # row 3\n-- ## 352\nCREATE TABLE public.e2e_user_posts (\n\tid UUID NOT NULL,\n\tuser_id UUID NOT NULL,\n\tcontent VARCHAR(255) NOT NULL DEFAULT '':::STRING,\n\tslug VARCHAR(32) NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tINDEX e2e_user_notes_user_id_idx (user_id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tFAMILY \"primary\" (id, user_id, content, slug)\n);\n-- # row 4\n-- ## 152\nALTER TABLE public.e2e_user_posts ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_posts VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/up/11.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 210\nCREATE TABLE public.e2e_authors (\n\tid UUID NOT NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, created_at, updated_at)\n);\n-- # row 3\n-- ## 352\nCREATE TABLE public.e2e_user_posts (\n\tid UUID NOT NULL,\n\tuser_id UUID NOT NULL,\n\tcontent VARCHAR(255) NOT NULL DEFAULT '':::STRING,\n\tslug VARCHAR(32) NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tINDEX e2e_user_notes_user_id_idx (user_id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tFAMILY \"primary\" (id, user_id, content, slug)\n);\n-- # row 4\n-- ## 154\nALTER TABLE public.e2e_user_posts ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (user_id) REFERENCES public.e2e_authors(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_posts VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/up/12.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 210\nCREATE TABLE public.e2e_authors (\n\tid UUID NOT NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, created_at, updated_at)\n);\n-- # row 3\n-- ## 358\nCREATE TABLE public.e2e_user_posts (\n\tid UUID NOT NULL,\n\tauthor_id UUID NOT NULL,\n\tcontent VARCHAR(255) NOT NULL DEFAULT '':::STRING,\n\tslug VARCHAR(32) NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tINDEX e2e_user_notes_user_id_idx (author_id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tFAMILY \"primary\" (id, author_id, content, slug)\n);\n-- # row 4\n-- ## 156\nALTER TABLE public.e2e_user_posts ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (author_id) REFERENCES public.e2e_authors(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_posts VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/up/13.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 210\nCREATE TABLE public.e2e_authors (\n\tid UUID NOT NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, created_at, updated_at)\n);\n-- # row 3\n-- ## 405\nCREATE TABLE public.e2e_user_posts (\n\tid UUID NOT NULL,\n\tcontent VARCHAR(255) NOT NULL DEFAULT '':::STRING,\n\tslug VARCHAR(32) NOT NULL,\n\tpublished BOOL NOT NULL DEFAULT false,\n\tauthor_id UUID NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tINDEX e2e_user_notes_user_id_idx (author_id ASC),\n\tFAMILY \"primary\" (id, content, slug, published, author_id)\n);\n-- # row 4\n-- ## 156\nALTER TABLE public.e2e_user_posts ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (author_id) REFERENCES public.e2e_authors(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_posts VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/up/14.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 210\nCREATE TABLE public.e2e_authors (\n\tid UUID NOT NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, created_at, updated_at)\n);\n-- # row 3\n-- ## 405\nCREATE TABLE public.e2e_user_posts (\n\tid UUID NOT NULL,\n\tcontent VARCHAR(255) NOT NULL DEFAULT '':::STRING,\n\tslug VARCHAR(32) NOT NULL,\n\tpublished BOOL NOT NULL DEFAULT false,\n\tauthor_id UUID NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tINDEX e2e_user_notes_user_id_idx (author_id ASC),\n\tFAMILY \"primary\" (id, content, slug, published, author_id)\n);\n-- # row 4\n-- ## 119\nCREATE TABLE public.e2e_flow (\n\tid UUID NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id)\n);\n-- # row 5\n-- ## 122\nCREATE TABLE public.e2e_address (\n\tid UUID NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id)\n);\n-- # row 6\n-- ## 322\nCREATE TABLE public.e2e_token (\n\tid UUID NOT NULL,\n\ttoken VARCHAR(64) NOT NULL,\n\te2e_flow_id UUID NOT NULL,\n\te2e_address_id UUID NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tUNIQUE INDEX e2e_token_uq_idx (token ASC),\n\tINDEX e2e_token_idx (token ASC),\n\tFAMILY \"primary\" (id, token, e2e_flow_id, e2e_address_id)\n);\n-- # row 7\n-- ## 156\nALTER TABLE public.e2e_user_posts ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (author_id) REFERENCES public.e2e_authors(id) ON DELETE CASCADE;\n-- # row 8\n-- ## 144\nALTER TABLE public.e2e_token ADD CONSTRAINT e2e_token_e2e_flow_id_fk FOREIGN KEY (e2e_flow_id) REFERENCES public.e2e_flow(id) ON DELETE CASCADE;\n-- # row 9\n-- ## 153\nALTER TABLE public.e2e_token ADD CONSTRAINT e2e_token_e2e_address_id_fk FOREIGN KEY (e2e_address_id) REFERENCES public.e2e_address(id) ON DELETE CASCADE;\n-- # row 10\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 11\n-- ## 85\nALTER TABLE public.e2e_user_posts VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # row 12\n-- ## 74\nALTER TABLE public.e2e_token VALIDATE CONSTRAINT e2e_token_e2e_flow_id_fk;\n-- # row 13\n-- ## 77\nALTER TABLE public.e2e_token VALIDATE CONSTRAINT e2e_token_e2e_address_id_fk;\n-- # 13 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/up/15.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 210\nCREATE TABLE public.e2e_authors (\n\tid UUID NOT NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, created_at, updated_at)\n);\n-- # row 3\n-- ## 405\nCREATE TABLE public.e2e_user_posts (\n\tid UUID NOT NULL,\n\tcontent VARCHAR(255) NOT NULL DEFAULT '':::STRING,\n\tslug VARCHAR(32) NOT NULL,\n\tpublished BOOL NOT NULL DEFAULT false,\n\tauthor_id UUID NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tINDEX e2e_user_notes_user_id_idx (author_id ASC),\n\tFAMILY \"primary\" (id, content, slug, published, author_id)\n);\n-- # row 4\n-- ## 119\nCREATE TABLE public.e2e_flow (\n\tid UUID NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id)\n);\n-- # row 5\n-- ## 122\nCREATE TABLE public.e2e_address (\n\tid UUID NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id)\n);\n-- # row 6\n-- ## 488\nCREATE TABLE public.e2e_token (\n\tid UUID NOT NULL,\n\ttoken VARCHAR(64) NOT NULL,\n\te2e_address_id UUID NOT NULL,\n\texpires_at TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00':::TIMESTAMP,\n\tissued_at TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00':::TIMESTAMP,\n\te2e_flow_id UUID NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tUNIQUE INDEX e2e_token_uq_idx (token ASC),\n\tINDEX e2e_token_idx (token ASC),\n\tFAMILY \"primary\" (id, token, e2e_address_id, expires_at, issued_at, e2e_flow_id)\n);\n-- # row 7\n-- ## 156\nALTER TABLE public.e2e_user_posts ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (author_id) REFERENCES public.e2e_authors(id) ON DELETE CASCADE;\n-- # row 8\n-- ## 153\nALTER TABLE public.e2e_token ADD CONSTRAINT e2e_token_e2e_address_id_fk FOREIGN KEY (e2e_address_id) REFERENCES public.e2e_address(id) ON DELETE CASCADE;\n-- # row 9\n-- ## 144\nALTER TABLE public.e2e_token ADD CONSTRAINT e2e_token_e2e_flow_id_fk FOREIGN KEY (e2e_flow_id) REFERENCES public.e2e_flow(id) ON DELETE CASCADE;\n-- # row 10\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 11\n-- ## 85\nALTER TABLE public.e2e_user_posts VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # row 12\n-- ## 77\nALTER TABLE public.e2e_token VALIDATE CONSTRAINT e2e_token_e2e_address_id_fk;\n-- # row 13\n-- ## 74\nALTER TABLE public.e2e_token VALIDATE CONSTRAINT e2e_token_e2e_flow_id_fk;\n-- # 13 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/up/2.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 247\nCREATE TABLE public.e2e_users (\n\tid UUID NOT NULL,\n\tusername VARCHAR(255) NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, username, created_at, updated_at)\n);\n-- # row 3\n-- ## 240\nCREATE TABLE public.e2e_user_notes (\n\tid UUID NOT NULL,\n\tnotes VARCHAR(255) NULL,\n\tuser_id UUID NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tINDEX e2e_user_notes_user_id_idx (user_id ASC),\n\tFAMILY \"primary\" (id, notes, user_id)\n);\n-- # row 4\n-- ## 152\nALTER TABLE public.e2e_user_notes ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_notes VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/up/3.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 247\nCREATE TABLE public.e2e_users (\n\tid UUID NOT NULL,\n\tusername VARCHAR(255) NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, username, created_at, updated_at)\n);\n-- # row 3\n-- ## 270\nCREATE TABLE public.e2e_user_notes (\n\tid UUID NOT NULL,\n\tnotes VARCHAR(255) NULL,\n\tuser_id UUID NOT NULL,\n\tslug VARCHAR(64) NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tINDEX e2e_user_notes_user_id_idx (user_id ASC),\n\tFAMILY \"primary\" (id, notes, user_id, slug)\n);\n-- # row 4\n-- ## 152\nALTER TABLE public.e2e_user_notes ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_notes VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/up/4.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 247\nCREATE TABLE public.e2e_users (\n\tid UUID NOT NULL,\n\tusername VARCHAR(255) NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, username, created_at, updated_at)\n);\n-- # row 3\n-- ## 270\nCREATE TABLE public.e2e_user_notes (\n\tid UUID NOT NULL,\n\tnotes VARCHAR(255) NULL,\n\tuser_id UUID NOT NULL,\n\tslug VARCHAR(64) NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tINDEX e2e_user_notes_user_id_idx (user_id ASC),\n\tFAMILY \"primary\" (id, notes, user_id, slug)\n);\n-- # row 4\n-- ## 152\nALTER TABLE public.e2e_user_notes ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_notes VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/up/5.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 247\nCREATE TABLE public.e2e_users (\n\tid UUID NOT NULL,\n\tusername VARCHAR(255) NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, username, created_at, updated_at)\n);\n-- # row 3\n-- ## 324\nCREATE TABLE public.e2e_user_notes (\n\tid UUID NOT NULL,\n\tnotes VARCHAR(255) NULL,\n\tuser_id UUID NOT NULL,\n\tslug VARCHAR(64) NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tINDEX e2e_user_notes_user_id_idx (user_id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tFAMILY \"primary\" (id, notes, user_id, slug)\n);\n-- # row 4\n-- ## 152\nALTER TABLE public.e2e_user_notes ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_notes VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/up/6.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 247\nCREATE TABLE public.e2e_users (\n\tid UUID NOT NULL,\n\tusername VARCHAR(255) NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, username, created_at, updated_at)\n);\n-- # row 3\n-- ## 324\nCREATE TABLE public.e2e_user_posts (\n\tid UUID NOT NULL,\n\tnotes VARCHAR(255) NULL,\n\tuser_id UUID NOT NULL,\n\tslug VARCHAR(64) NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tINDEX e2e_user_notes_user_id_idx (user_id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tFAMILY \"primary\" (id, notes, user_id, slug)\n);\n-- # row 4\n-- ## 152\nALTER TABLE public.e2e_user_posts ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_posts VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/up/7.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 247\nCREATE TABLE public.e2e_users (\n\tid UUID NOT NULL,\n\tusername VARCHAR(255) NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, username, created_at, updated_at)\n);\n-- # row 3\n-- ## 352\nCREATE TABLE public.e2e_user_posts (\n\tid UUID NOT NULL,\n\tuser_id UUID NOT NULL,\n\tslug VARCHAR(64) NOT NULL,\n\tcontent VARCHAR(255) NOT NULL DEFAULT '':::STRING,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tINDEX e2e_user_notes_user_id_idx (user_id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tFAMILY \"primary\" (id, user_id, slug, content)\n);\n-- # row 4\n-- ## 152\nALTER TABLE public.e2e_user_posts ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_posts VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/up/8.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 239\nCREATE TABLE public.e2e_users (\n\tid UUID NOT NULL,\n\tname VARCHAR(255) NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, name, created_at, updated_at)\n);\n-- # row 3\n-- ## 352\nCREATE TABLE public.e2e_user_posts (\n\tid UUID NOT NULL,\n\tuser_id UUID NOT NULL,\n\tslug VARCHAR(64) NOT NULL,\n\tcontent VARCHAR(255) NOT NULL DEFAULT '':::STRING,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tINDEX e2e_user_notes_user_id_idx (user_id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tFAMILY \"primary\" (id, user_id, slug, content)\n);\n-- # row 4\n-- ## 152\nALTER TABLE public.e2e_user_posts ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_posts VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/cockroach/up/9.sql",
    "content": "-- # 1 column\n-- # row 1\n-- ## 269\nCREATE TABLE public.schema_migration (\n\tversion VARCHAR(14) NOT NULL,\n\trowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),\n\tCONSTRAINT \"primary\" PRIMARY KEY (rowid ASC),\n\tUNIQUE INDEX schema_migration_version_idx (version ASC),\n\tFAMILY \"primary\" (version, rowid)\n);\n-- # row 2\n-- ## 208\nCREATE TABLE public.e2e_users (\n\tid UUID NOT NULL,\n\tcreated_at TIMESTAMP NOT NULL,\n\tupdated_at TIMESTAMP NOT NULL,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tFAMILY \"primary\" (id, created_at, updated_at)\n);\n-- # row 3\n-- ## 352\nCREATE TABLE public.e2e_user_posts (\n\tid UUID NOT NULL,\n\tuser_id UUID NOT NULL,\n\tslug VARCHAR(64) NOT NULL,\n\tcontent VARCHAR(255) NOT NULL DEFAULT '':::STRING,\n\tCONSTRAINT \"primary\" PRIMARY KEY (id ASC),\n\tINDEX e2e_user_notes_user_id_idx (user_id ASC),\n\tUNIQUE INDEX e2e_user_notes_slug_idx (slug ASC),\n\tFAMILY \"primary\" (id, user_id, slug, content)\n);\n-- # row 4\n-- ## 152\nALTER TABLE public.e2e_user_posts ADD CONSTRAINT e2e_user_notes_e2e_users_id_fk FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n-- # row 5\n-- ## 115\n-- Validate foreign key constraints. These can fail if there was unvalidated data during the SHOW CREATE ALL TABLES\n-- # row 6\n-- ## 85\nALTER TABLE public.e2e_user_posts VALIDATE CONSTRAINT e2e_user_notes_e2e_users_id_fk;\n-- # 6 rows\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/down/0.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:22\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/down/1.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_users`\n--\n\nDROP TABLE IF EXISTS `e2e_users`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_users` (\n  `id` char(36) NOT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  `username` varchar(255) DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:22\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/down/10.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_user_posts`\n--\n\nDROP TABLE IF EXISTS `e2e_user_posts`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_posts` (\n  `id` char(36) NOT NULL,\n  `user_id` char(36) NOT NULL,\n  `slug` varchar(64) NOT NULL,\n  `content` varchar(255) NOT NULL DEFAULT '',\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`user_id`),\n  CONSTRAINT `e2e_user_posts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `e2e_users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_users`\n--\n\nDROP TABLE IF EXISTS `e2e_users`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_users` (\n  `id` char(36) NOT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:18\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/down/11.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_user_posts`\n--\n\nDROP TABLE IF EXISTS `e2e_user_posts`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_posts` (\n  `id` char(36) NOT NULL,\n  `user_id` char(36) NOT NULL,\n  `slug` varchar(32) NOT NULL,\n  `content` varchar(255) NOT NULL DEFAULT '',\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`user_id`),\n  CONSTRAINT `e2e_user_posts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `e2e_users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_users`\n--\n\nDROP TABLE IF EXISTS `e2e_users`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_users` (\n  `id` char(36) NOT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:18\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/down/12.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_authors`\n--\n\nDROP TABLE IF EXISTS `e2e_authors`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_authors` (\n  `id` char(36) NOT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_user_posts`\n--\n\nDROP TABLE IF EXISTS `e2e_user_posts`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_posts` (\n  `id` char(36) NOT NULL,\n  `user_id` char(36) NOT NULL,\n  `slug` varchar(32) NOT NULL,\n  `content` varchar(255) NOT NULL DEFAULT '',\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`user_id`),\n  CONSTRAINT `e2e_user_posts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `e2e_authors` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:18\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/down/13.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_authors`\n--\n\nDROP TABLE IF EXISTS `e2e_authors`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_authors` (\n  `id` char(36) NOT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_user_posts`\n--\n\nDROP TABLE IF EXISTS `e2e_user_posts`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_posts` (\n  `id` char(36) NOT NULL,\n  `author_id` char(36) NOT NULL,\n  `slug` varchar(32) NOT NULL,\n  `content` varchar(255) NOT NULL DEFAULT '',\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`author_id`),\n  CONSTRAINT `e2e_user_posts_ibfk_1` FOREIGN KEY (`author_id`) REFERENCES `e2e_authors` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:17\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/down/14.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_authors`\n--\n\nDROP TABLE IF EXISTS `e2e_authors`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_authors` (\n  `id` char(36) NOT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_user_posts`\n--\n\nDROP TABLE IF EXISTS `e2e_user_posts`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_posts` (\n  `id` char(36) NOT NULL,\n  `author_id` char(36) DEFAULT NULL,\n  `slug` varchar(32) NOT NULL,\n  `content` varchar(255) NOT NULL DEFAULT '',\n  `published` tinyint(1) NOT NULL DEFAULT '0',\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`author_id`),\n  CONSTRAINT `e2e_user_posts_ibfk_1` FOREIGN KEY (`author_id`) REFERENCES `e2e_authors` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:17\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/down/15.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_address`\n--\n\nDROP TABLE IF EXISTS `e2e_address`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_address` (\n  `id` char(36) NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_authors`\n--\n\nDROP TABLE IF EXISTS `e2e_authors`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_authors` (\n  `id` char(36) NOT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_flow`\n--\n\nDROP TABLE IF EXISTS `e2e_flow`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_flow` (\n  `id` char(36) NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_token`\n--\n\nDROP TABLE IF EXISTS `e2e_token`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_token` (\n  `id` char(36) NOT NULL,\n  `token` varchar(64) NOT NULL,\n  `e2e_flow_id` char(36) NOT NULL,\n  `e2e_address_id` char(36) NOT NULL,\n  `expires_at` datetime NOT NULL DEFAULT '2000-01-01 00:00:00',\n  `issued_at` datetime NOT NULL DEFAULT '2000-01-01 00:00:00',\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_token_uq_idx` (`token`),\n  KEY `e2e_flow_id` (`e2e_flow_id`),\n  KEY `e2e_address_id` (`e2e_address_id`),\n  KEY `e2e_token_idx` (`token`),\n  CONSTRAINT `e2e_token_ibfk_1` FOREIGN KEY (`e2e_flow_id`) REFERENCES `e2e_flow` (`id`) ON DELETE CASCADE,\n  CONSTRAINT `e2e_token_ibfk_2` FOREIGN KEY (`e2e_address_id`) REFERENCES `e2e_address` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_user_posts`\n--\n\nDROP TABLE IF EXISTS `e2e_user_posts`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_posts` (\n  `id` char(36) NOT NULL,\n  `author_id` char(36) DEFAULT NULL,\n  `slug` varchar(32) NOT NULL,\n  `content` varchar(255) NOT NULL DEFAULT '',\n  `published` tinyint(1) NOT NULL DEFAULT '0',\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`author_id`),\n  CONSTRAINT `e2e_user_posts_ibfk_1` FOREIGN KEY (`author_id`) REFERENCES `e2e_authors` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:17\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/down/2.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_user_notes`\n--\n\nDROP TABLE IF EXISTS `e2e_user_notes`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_notes` (\n  `id` char(36) NOT NULL,\n  `user_id` char(36) NOT NULL,\n  `notes` varchar(255) DEFAULT NULL,\n  `title` varchar(64) NOT NULL DEFAULT '',\n  PRIMARY KEY (`id`),\n  KEY `e2e_user_notes_user_id_idx` (`user_id`),\n  KEY `e2e_user_notes_title_idx` (`title`),\n  CONSTRAINT `e2e_user_notes_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `e2e_users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_users`\n--\n\nDROP TABLE IF EXISTS `e2e_users`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_users` (\n  `id` char(36) NOT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  `username` varchar(255) DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:21\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/down/3.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_user_notes`\n--\n\nDROP TABLE IF EXISTS `e2e_user_notes`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_notes` (\n  `id` char(36) NOT NULL,\n  `user_id` char(36) NOT NULL,\n  `notes` varchar(255) DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `e2e_user_notes_user_id_idx` (`user_id`),\n  CONSTRAINT `e2e_user_notes_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `e2e_users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_users`\n--\n\nDROP TABLE IF EXISTS `e2e_users`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_users` (\n  `id` char(36) NOT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  `username` varchar(255) DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:21\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/down/4.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_user_notes`\n--\n\nDROP TABLE IF EXISTS `e2e_user_notes`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_notes` (\n  `id` char(36) NOT NULL,\n  `user_id` char(36) NOT NULL,\n  `slug` varchar(64) NOT NULL,\n  `notes` varchar(255) DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`user_id`),\n  CONSTRAINT `e2e_user_notes_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `e2e_users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_users`\n--\n\nDROP TABLE IF EXISTS `e2e_users`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_users` (\n  `id` char(36) NOT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  `username` varchar(255) DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:20\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/down/5.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_user_notes`\n--\n\nDROP TABLE IF EXISTS `e2e_user_notes`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_notes` (\n  `id` char(36) NOT NULL,\n  `user_id` char(36) NOT NULL,\n  `slug` varchar(64) NOT NULL,\n  `notes` varchar(255) DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`user_id`),\n  CONSTRAINT `e2e_user_notes_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `e2e_users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_users`\n--\n\nDROP TABLE IF EXISTS `e2e_users`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_users` (\n  `id` char(36) NOT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  `username` varchar(255) DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:20\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/down/6.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_user_notes`\n--\n\nDROP TABLE IF EXISTS `e2e_user_notes`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_notes` (\n  `id` char(36) NOT NULL,\n  `user_id` char(36) NOT NULL,\n  `slug` varchar(64) NOT NULL,\n  `notes` varchar(255) DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`user_id`),\n  CONSTRAINT `e2e_user_notes_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `e2e_users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_users`\n--\n\nDROP TABLE IF EXISTS `e2e_users`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_users` (\n  `id` char(36) NOT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  `username` varchar(255) DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:20\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/down/7.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_user_posts`\n--\n\nDROP TABLE IF EXISTS `e2e_user_posts`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_posts` (\n  `id` char(36) NOT NULL,\n  `user_id` char(36) NOT NULL,\n  `slug` varchar(64) NOT NULL,\n  `notes` varchar(255) DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`user_id`),\n  CONSTRAINT `e2e_user_posts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `e2e_users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_users`\n--\n\nDROP TABLE IF EXISTS `e2e_users`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_users` (\n  `id` char(36) NOT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  `username` varchar(255) DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:19\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/down/8.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_user_posts`\n--\n\nDROP TABLE IF EXISTS `e2e_user_posts`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_posts` (\n  `id` char(36) NOT NULL,\n  `user_id` char(36) NOT NULL,\n  `slug` varchar(64) NOT NULL,\n  `content` varchar(255) NOT NULL DEFAULT '',\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`user_id`),\n  CONSTRAINT `e2e_user_posts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `e2e_users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_users`\n--\n\nDROP TABLE IF EXISTS `e2e_users`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_users` (\n  `id` char(36) NOT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  `username` varchar(255) DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:19\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/down/9.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_user_posts`\n--\n\nDROP TABLE IF EXISTS `e2e_user_posts`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_posts` (\n  `id` char(36) NOT NULL,\n  `user_id` char(36) NOT NULL,\n  `slug` varchar(64) NOT NULL,\n  `content` varchar(255) NOT NULL DEFAULT '',\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`user_id`),\n  CONSTRAINT `e2e_user_posts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `e2e_users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_users`\n--\n\nDROP TABLE IF EXISTS `e2e_users`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_users` (\n  `id` char(36) NOT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  `name` varchar(255) DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:19\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/up/0.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_users`\n--\n\nDROP TABLE IF EXISTS `e2e_users`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_users` (\n  `id` char(36) NOT NULL,\n  `username` varchar(255) DEFAULT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:11\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/up/1.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_user_notes`\n--\n\nDROP TABLE IF EXISTS `e2e_user_notes`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_notes` (\n  `id` char(36) NOT NULL,\n  `notes` varchar(255) DEFAULT NULL,\n  `title` varchar(64) NOT NULL DEFAULT '',\n  `user_id` char(36) NOT NULL,\n  PRIMARY KEY (`id`),\n  KEY `e2e_user_notes_user_id_idx` (`user_id`),\n  KEY `e2e_user_notes_title_idx` (`title`),\n  CONSTRAINT `e2e_user_notes_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `e2e_users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_users`\n--\n\nDROP TABLE IF EXISTS `e2e_users`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_users` (\n  `id` char(36) NOT NULL,\n  `username` varchar(255) DEFAULT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:11\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/up/10.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_user_posts`\n--\n\nDROP TABLE IF EXISTS `e2e_user_posts`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_posts` (\n  `id` char(36) NOT NULL,\n  `user_id` char(36) NOT NULL,\n  `slug` varchar(32) NOT NULL,\n  `content` varchar(255) NOT NULL DEFAULT '',\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`user_id`),\n  CONSTRAINT `e2e_user_posts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `e2e_users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_users`\n--\n\nDROP TABLE IF EXISTS `e2e_users`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_users` (\n  `id` char(36) NOT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:14\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/up/11.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_authors`\n--\n\nDROP TABLE IF EXISTS `e2e_authors`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_authors` (\n  `id` char(36) NOT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_user_posts`\n--\n\nDROP TABLE IF EXISTS `e2e_user_posts`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_posts` (\n  `id` char(36) NOT NULL,\n  `user_id` char(36) NOT NULL,\n  `slug` varchar(32) NOT NULL,\n  `content` varchar(255) NOT NULL DEFAULT '',\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`user_id`),\n  CONSTRAINT `e2e_user_posts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `e2e_authors` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:14\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/up/12.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_authors`\n--\n\nDROP TABLE IF EXISTS `e2e_authors`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_authors` (\n  `id` char(36) NOT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_user_posts`\n--\n\nDROP TABLE IF EXISTS `e2e_user_posts`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_posts` (\n  `id` char(36) NOT NULL,\n  `author_id` char(36) NOT NULL,\n  `slug` varchar(32) NOT NULL,\n  `content` varchar(255) NOT NULL DEFAULT '',\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`author_id`),\n  CONSTRAINT `e2e_user_posts_ibfk_1` FOREIGN KEY (`author_id`) REFERENCES `e2e_authors` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:15\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/up/13.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_authors`\n--\n\nDROP TABLE IF EXISTS `e2e_authors`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_authors` (\n  `id` char(36) NOT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_user_posts`\n--\n\nDROP TABLE IF EXISTS `e2e_user_posts`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_posts` (\n  `id` char(36) NOT NULL,\n  `author_id` char(36) DEFAULT NULL,\n  `slug` varchar(32) NOT NULL,\n  `content` varchar(255) NOT NULL DEFAULT '',\n  `published` tinyint(1) NOT NULL DEFAULT '0',\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`author_id`),\n  CONSTRAINT `e2e_user_posts_ibfk_1` FOREIGN KEY (`author_id`) REFERENCES `e2e_authors` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:15\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/up/14.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_address`\n--\n\nDROP TABLE IF EXISTS `e2e_address`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_address` (\n  `id` char(36) NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_authors`\n--\n\nDROP TABLE IF EXISTS `e2e_authors`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_authors` (\n  `id` char(36) NOT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_flow`\n--\n\nDROP TABLE IF EXISTS `e2e_flow`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_flow` (\n  `id` char(36) NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_token`\n--\n\nDROP TABLE IF EXISTS `e2e_token`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_token` (\n  `id` char(36) NOT NULL,\n  `token` varchar(64) NOT NULL,\n  `e2e_flow_id` char(36) NOT NULL,\n  `e2e_address_id` char(36) NOT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_token_uq_idx` (`token`),\n  KEY `e2e_flow_id` (`e2e_flow_id`),\n  KEY `e2e_address_id` (`e2e_address_id`),\n  KEY `e2e_token_idx` (`token`),\n  CONSTRAINT `e2e_token_ibfk_1` FOREIGN KEY (`e2e_flow_id`) REFERENCES `e2e_flow` (`id`) ON DELETE CASCADE,\n  CONSTRAINT `e2e_token_ibfk_2` FOREIGN KEY (`e2e_address_id`) REFERENCES `e2e_address` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_user_posts`\n--\n\nDROP TABLE IF EXISTS `e2e_user_posts`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_posts` (\n  `id` char(36) NOT NULL,\n  `author_id` char(36) DEFAULT NULL,\n  `slug` varchar(32) NOT NULL,\n  `content` varchar(255) NOT NULL DEFAULT '',\n  `published` tinyint(1) NOT NULL DEFAULT '0',\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`author_id`),\n  CONSTRAINT `e2e_user_posts_ibfk_1` FOREIGN KEY (`author_id`) REFERENCES `e2e_authors` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:16\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/up/15.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_address`\n--\n\nDROP TABLE IF EXISTS `e2e_address`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_address` (\n  `id` char(36) NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_authors`\n--\n\nDROP TABLE IF EXISTS `e2e_authors`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_authors` (\n  `id` char(36) NOT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_flow`\n--\n\nDROP TABLE IF EXISTS `e2e_flow`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_flow` (\n  `id` char(36) NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_token`\n--\n\nDROP TABLE IF EXISTS `e2e_token`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_token` (\n  `id` char(36) NOT NULL,\n  `token` varchar(64) NOT NULL,\n  `e2e_flow_id` char(36) DEFAULT NULL,\n  `e2e_address_id` char(36) NOT NULL,\n  `expires_at` datetime NOT NULL DEFAULT '2000-01-01 00:00:00',\n  `issued_at` datetime NOT NULL DEFAULT '2000-01-01 00:00:00',\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_token_uq_idx` (`token`),\n  KEY `e2e_flow_id` (`e2e_flow_id`),\n  KEY `e2e_address_id` (`e2e_address_id`),\n  KEY `e2e_token_idx` (`token`),\n  CONSTRAINT `e2e_token_ibfk_1` FOREIGN KEY (`e2e_flow_id`) REFERENCES `e2e_flow` (`id`) ON DELETE CASCADE,\n  CONSTRAINT `e2e_token_ibfk_2` FOREIGN KEY (`e2e_address_id`) REFERENCES `e2e_address` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_user_posts`\n--\n\nDROP TABLE IF EXISTS `e2e_user_posts`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_posts` (\n  `id` char(36) NOT NULL,\n  `author_id` char(36) DEFAULT NULL,\n  `slug` varchar(32) NOT NULL,\n  `content` varchar(255) NOT NULL DEFAULT '',\n  `published` tinyint(1) NOT NULL DEFAULT '0',\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`author_id`),\n  CONSTRAINT `e2e_user_posts_ibfk_1` FOREIGN KEY (`author_id`) REFERENCES `e2e_authors` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:16\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/up/2.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_user_notes`\n--\n\nDROP TABLE IF EXISTS `e2e_user_notes`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_notes` (\n  `id` char(36) NOT NULL,\n  `notes` varchar(255) DEFAULT NULL,\n  `user_id` char(36) NOT NULL,\n  PRIMARY KEY (`id`),\n  KEY `e2e_user_notes_user_id_idx` (`user_id`),\n  CONSTRAINT `e2e_user_notes_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `e2e_users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_users`\n--\n\nDROP TABLE IF EXISTS `e2e_users`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_users` (\n  `id` char(36) NOT NULL,\n  `username` varchar(255) DEFAULT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:11\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/up/3.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_user_notes`\n--\n\nDROP TABLE IF EXISTS `e2e_user_notes`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_notes` (\n  `id` char(36) NOT NULL,\n  `notes` varchar(255) DEFAULT NULL,\n  `user_id` char(36) NOT NULL,\n  `slug` varchar(64) DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `e2e_user_notes_user_id_idx` (`user_id`),\n  CONSTRAINT `e2e_user_notes_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `e2e_users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_users`\n--\n\nDROP TABLE IF EXISTS `e2e_users`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_users` (\n  `id` char(36) NOT NULL,\n  `username` varchar(255) DEFAULT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:12\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/up/4.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_user_notes`\n--\n\nDROP TABLE IF EXISTS `e2e_user_notes`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_notes` (\n  `id` char(36) NOT NULL,\n  `notes` varchar(255) DEFAULT NULL,\n  `user_id` char(36) NOT NULL,\n  `slug` varchar(64) DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `e2e_user_notes_user_id_idx` (`user_id`),\n  CONSTRAINT `e2e_user_notes_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `e2e_users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_users`\n--\n\nDROP TABLE IF EXISTS `e2e_users`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_users` (\n  `id` char(36) NOT NULL,\n  `username` varchar(255) DEFAULT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:12\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/up/5.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_user_notes`\n--\n\nDROP TABLE IF EXISTS `e2e_user_notes`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_notes` (\n  `id` char(36) NOT NULL,\n  `notes` varchar(255) DEFAULT NULL,\n  `user_id` char(36) NOT NULL,\n  `slug` varchar(64) NOT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`user_id`),\n  CONSTRAINT `e2e_user_notes_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `e2e_users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_users`\n--\n\nDROP TABLE IF EXISTS `e2e_users`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_users` (\n  `id` char(36) NOT NULL,\n  `username` varchar(255) DEFAULT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:12\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/up/6.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_user_posts`\n--\n\nDROP TABLE IF EXISTS `e2e_user_posts`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_posts` (\n  `id` char(36) NOT NULL,\n  `notes` varchar(255) DEFAULT NULL,\n  `user_id` char(36) NOT NULL,\n  `slug` varchar(64) NOT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`user_id`),\n  CONSTRAINT `e2e_user_posts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `e2e_users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_users`\n--\n\nDROP TABLE IF EXISTS `e2e_users`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_users` (\n  `id` char(36) NOT NULL,\n  `username` varchar(255) DEFAULT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:12\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/up/7.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_user_posts`\n--\n\nDROP TABLE IF EXISTS `e2e_user_posts`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_posts` (\n  `id` char(36) NOT NULL,\n  `user_id` char(36) NOT NULL,\n  `slug` varchar(64) NOT NULL,\n  `content` varchar(255) NOT NULL DEFAULT '',\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`user_id`),\n  CONSTRAINT `e2e_user_posts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `e2e_users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_users`\n--\n\nDROP TABLE IF EXISTS `e2e_users`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_users` (\n  `id` char(36) NOT NULL,\n  `username` varchar(255) DEFAULT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:13\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/up/8.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_user_posts`\n--\n\nDROP TABLE IF EXISTS `e2e_user_posts`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_posts` (\n  `id` char(36) NOT NULL,\n  `user_id` char(36) NOT NULL,\n  `slug` varchar(64) NOT NULL,\n  `content` varchar(255) NOT NULL DEFAULT '',\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`user_id`),\n  CONSTRAINT `e2e_user_posts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `e2e_users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_users`\n--\n\nDROP TABLE IF EXISTS `e2e_users`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_users` (\n  `id` char(36) NOT NULL,\n  `name` varchar(255) DEFAULT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:13\n"
  },
  {
    "path": "testdata/e2e/fixtures/mysql/up/9.sql",
    "content": "-- MySQL dump 10.13  Distrib 8.0.21, for osx10.15 (x86_64)\n--\n-- Host: 127.0.0.1    Database: pop_test\n-- ------------------------------------------------------\n-- Server version\t5.7.31\n\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!50503 SET NAMES utf8mb4 */;\n/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n/*!40103 SET TIME_ZONE='+00:00' */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n--\n-- Table structure for table `e2e_user_posts`\n--\n\nDROP TABLE IF EXISTS `e2e_user_posts`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_user_posts` (\n  `id` char(36) NOT NULL,\n  `user_id` char(36) NOT NULL,\n  `slug` varchar(64) NOT NULL,\n  `content` varchar(255) NOT NULL DEFAULT '',\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `e2e_user_notes_slug_idx` (`slug`),\n  KEY `e2e_user_notes_user_id_idx` (`user_id`),\n  CONSTRAINT `e2e_user_posts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `e2e_users` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `e2e_users`\n--\n\nDROP TABLE IF EXISTS `e2e_users`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `e2e_users` (\n  `id` char(36) NOT NULL,\n  `created_at` datetime NOT NULL,\n  `updated_at` datetime NOT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n\n--\n-- Table structure for table `schema_migration`\n--\n\nDROP TABLE IF EXISTS `schema_migration`;\n/*!40101 SET @saved_cs_client     = @@character_set_client */;\n/*!50503 SET character_set_client = utf8mb4 */;\nCREATE TABLE `schema_migration` (\n  `version` varchar(14) NOT NULL,\n  UNIQUE KEY `schema_migration_version_idx` (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n/*!40101 SET character_set_client = @saved_cs_client */;\n/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;\n\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n\n-- Dump completed on 2020-09-03 11:40:13\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/down/0.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/down/1.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_users; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_users (\n    id uuid NOT NULL,\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL,\n    username character varying(255)\n);\n\n\nALTER TABLE public.e2e_users OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_users e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_users\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/down/10.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_user_posts; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_posts (\n    id uuid NOT NULL,\n    user_id uuid NOT NULL,\n    slug character varying(64) NOT NULL,\n    content character varying(255) DEFAULT ''::character varying NOT NULL\n);\n\n\nALTER TABLE public.e2e_user_posts OWNER TO postgres;\n\n--\n-- Name: e2e_users; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_users (\n    id uuid NOT NULL,\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_users OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_users e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_users\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_posts USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_posts USING btree (user_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_posts e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/down/11.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_user_posts; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_posts (\n    id uuid NOT NULL,\n    user_id uuid NOT NULL,\n    slug character varying(32) NOT NULL,\n    content character varying(255) DEFAULT ''::character varying NOT NULL\n);\n\n\nALTER TABLE public.e2e_user_posts OWNER TO postgres;\n\n--\n-- Name: e2e_users; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_users (\n    id uuid NOT NULL,\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_users OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_users e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_users\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_posts USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_posts USING btree (user_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_posts e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/down/12.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_authors; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_authors (\n    id uuid NOT NULL,\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_authors OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_posts (\n    id uuid NOT NULL,\n    user_id uuid NOT NULL,\n    slug character varying(32) NOT NULL,\n    content character varying(255) DEFAULT ''::character varying NOT NULL\n);\n\n\nALTER TABLE public.e2e_user_posts OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_authors e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_authors\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_posts USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_posts USING btree (user_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_posts e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.e2e_authors(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/down/13.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_authors; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_authors (\n    id uuid NOT NULL,\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_authors OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_posts (\n    id uuid NOT NULL,\n    author_id uuid NOT NULL,\n    slug character varying(32) NOT NULL,\n    content character varying(255) DEFAULT ''::character varying NOT NULL\n);\n\n\nALTER TABLE public.e2e_user_posts OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_authors e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_authors\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_posts USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_posts USING btree (author_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_posts e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (author_id) REFERENCES public.e2e_authors(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/down/14.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_authors; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_authors (\n    id uuid NOT NULL,\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_authors OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_posts (\n    id uuid NOT NULL,\n    author_id uuid,\n    slug character varying(32) NOT NULL,\n    content character varying(255) DEFAULT ''::character varying NOT NULL,\n    published boolean DEFAULT false NOT NULL\n);\n\n\nALTER TABLE public.e2e_user_posts OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_authors e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_authors\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_posts USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_posts USING btree (author_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_posts e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (author_id) REFERENCES public.e2e_authors(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/down/15.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_address; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_address (\n    id uuid NOT NULL\n);\n\n\nALTER TABLE public.e2e_address OWNER TO postgres;\n\n--\n-- Name: e2e_authors; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_authors (\n    id uuid NOT NULL,\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_authors OWNER TO postgres;\n\n--\n-- Name: e2e_flow; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_flow (\n    id uuid NOT NULL\n);\n\n\nALTER TABLE public.e2e_flow OWNER TO postgres;\n\n--\n-- Name: e2e_token; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_token (\n    id uuid NOT NULL,\n    token character varying(64) NOT NULL,\n    e2e_flow_id uuid NOT NULL,\n    e2e_address_id uuid NOT NULL,\n    expires_at timestamp without time zone DEFAULT '2000-01-01 00:00:00'::timestamp without time zone NOT NULL,\n    issued_at timestamp without time zone DEFAULT '2000-01-01 00:00:00'::timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_token OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_posts (\n    id uuid NOT NULL,\n    author_id uuid,\n    slug character varying(32) NOT NULL,\n    content character varying(255) DEFAULT ''::character varying NOT NULL,\n    published boolean DEFAULT false NOT NULL\n);\n\n\nALTER TABLE public.e2e_user_posts OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_address e2e_address_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_address\n    ADD CONSTRAINT e2e_address_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_flow e2e_flow_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_flow\n    ADD CONSTRAINT e2e_flow_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_token e2e_token_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_token\n    ADD CONSTRAINT e2e_token_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_posts e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_authors e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_authors\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_token_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_token_idx ON public.e2e_token USING btree (token);\n\n\n--\n-- Name: e2e_token_uq_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_token_uq_idx ON public.e2e_token USING btree (token);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_posts USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_posts USING btree (author_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_token e2e_token_e2e_address_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_token\n    ADD CONSTRAINT e2e_token_e2e_address_id_fkey FOREIGN KEY (e2e_address_id) REFERENCES public.e2e_address(id) ON DELETE CASCADE;\n\n\n--\n-- Name: e2e_token e2e_token_e2e_flow_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_token\n    ADD CONSTRAINT e2e_token_e2e_flow_id_fkey FOREIGN KEY (e2e_flow_id) REFERENCES public.e2e_flow(id) ON DELETE CASCADE;\n\n\n--\n-- Name: e2e_user_posts e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (author_id) REFERENCES public.e2e_authors(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/down/2.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_user_notes; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_notes (\n    id uuid NOT NULL,\n    user_id uuid NOT NULL,\n    notes character varying(255),\n    title character varying(64) DEFAULT ''::character varying NOT NULL\n);\n\n\nALTER TABLE public.e2e_user_notes OWNER TO postgres;\n\n--\n-- Name: e2e_users; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_users (\n    id uuid NOT NULL,\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL,\n    username character varying(255)\n);\n\n\nALTER TABLE public.e2e_users OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_notes e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_notes\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_users e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_users\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_title_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_title_idx ON public.e2e_user_notes USING btree (title);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_notes USING btree (user_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_notes e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_notes\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/down/3.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_user_notes; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_notes (\n    id uuid NOT NULL,\n    user_id uuid NOT NULL,\n    notes character varying(255)\n);\n\n\nALTER TABLE public.e2e_user_notes OWNER TO postgres;\n\n--\n-- Name: e2e_users; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_users (\n    id uuid NOT NULL,\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL,\n    username character varying(255)\n);\n\n\nALTER TABLE public.e2e_users OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_notes e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_notes\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_users e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_users\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_notes USING btree (user_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_notes e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_notes\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/down/4.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_user_notes; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_notes (\n    id uuid NOT NULL,\n    user_id uuid NOT NULL,\n    slug character varying(64) NOT NULL,\n    notes character varying(255)\n);\n\n\nALTER TABLE public.e2e_user_notes OWNER TO postgres;\n\n--\n-- Name: e2e_users; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_users (\n    id uuid NOT NULL,\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL,\n    username character varying(255)\n);\n\n\nALTER TABLE public.e2e_users OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_notes e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_notes\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_users e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_users\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_notes USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_notes USING btree (user_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_notes e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_notes\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/down/5.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_user_notes; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_notes (\n    id uuid NOT NULL,\n    user_id uuid NOT NULL,\n    slug character varying(64) NOT NULL,\n    notes character varying(255)\n);\n\n\nALTER TABLE public.e2e_user_notes OWNER TO postgres;\n\n--\n-- Name: e2e_users; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_users (\n    id uuid NOT NULL,\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL,\n    username character varying(255)\n);\n\n\nALTER TABLE public.e2e_users OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_notes e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_notes\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_users e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_users\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_notes USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_notes USING btree (user_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_notes e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_notes\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/down/6.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_user_notes; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_notes (\n    id uuid NOT NULL,\n    user_id uuid NOT NULL,\n    slug character varying(64) NOT NULL,\n    notes character varying(255)\n);\n\n\nALTER TABLE public.e2e_user_notes OWNER TO postgres;\n\n--\n-- Name: e2e_users; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_users (\n    id uuid NOT NULL,\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL,\n    username character varying(255)\n);\n\n\nALTER TABLE public.e2e_users OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_notes e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_notes\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_users e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_users\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_notes USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_notes USING btree (user_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_notes e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_notes\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/down/7.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_user_posts; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_posts (\n    id uuid NOT NULL,\n    user_id uuid NOT NULL,\n    slug character varying(64) NOT NULL,\n    notes character varying(255)\n);\n\n\nALTER TABLE public.e2e_user_posts OWNER TO postgres;\n\n--\n-- Name: e2e_users; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_users (\n    id uuid NOT NULL,\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL,\n    username character varying(255)\n);\n\n\nALTER TABLE public.e2e_users OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_users e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_users\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_posts USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_posts USING btree (user_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_posts e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/down/8.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_user_posts; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_posts (\n    id uuid NOT NULL,\n    user_id uuid NOT NULL,\n    slug character varying(64) NOT NULL,\n    content character varying(255) DEFAULT ''::character varying NOT NULL\n);\n\n\nALTER TABLE public.e2e_user_posts OWNER TO postgres;\n\n--\n-- Name: e2e_users; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_users (\n    id uuid NOT NULL,\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL,\n    username character varying(255)\n);\n\n\nALTER TABLE public.e2e_users OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_users e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_users\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_posts USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_posts USING btree (user_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_posts e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/down/9.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_user_posts; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_posts (\n    id uuid NOT NULL,\n    user_id uuid NOT NULL,\n    slug character varying(64) NOT NULL,\n    content character varying(255) DEFAULT ''::character varying NOT NULL\n);\n\n\nALTER TABLE public.e2e_user_posts OWNER TO postgres;\n\n--\n-- Name: e2e_users; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_users (\n    id uuid NOT NULL,\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL,\n    name character varying(255)\n);\n\n\nALTER TABLE public.e2e_users OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_users e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_users\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_posts USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_posts USING btree (user_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_posts e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/up/0.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_users; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_users (\n    id uuid NOT NULL,\n    username character varying(255),\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_users OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_users e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_users\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/up/1.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_user_notes; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_notes (\n    id uuid NOT NULL,\n    notes character varying(255),\n    title character varying(64) DEFAULT ''::character varying NOT NULL,\n    user_id uuid NOT NULL\n);\n\n\nALTER TABLE public.e2e_user_notes OWNER TO postgres;\n\n--\n-- Name: e2e_users; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_users (\n    id uuid NOT NULL,\n    username character varying(255),\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_users OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_notes e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_notes\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_users e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_users\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_title_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_title_idx ON public.e2e_user_notes USING btree (title);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_notes USING btree (user_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_notes e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_notes\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/up/10.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_user_posts; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_posts (\n    id uuid NOT NULL,\n    user_id uuid NOT NULL,\n    slug character varying(32) NOT NULL,\n    content character varying(255) DEFAULT ''::character varying NOT NULL\n);\n\n\nALTER TABLE public.e2e_user_posts OWNER TO postgres;\n\n--\n-- Name: e2e_users; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_users (\n    id uuid NOT NULL,\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_users OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_users e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_users\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_posts USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_posts USING btree (user_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_posts e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/up/11.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_authors; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_authors (\n    id uuid NOT NULL,\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_authors OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_posts (\n    id uuid NOT NULL,\n    user_id uuid NOT NULL,\n    slug character varying(32) NOT NULL,\n    content character varying(255) DEFAULT ''::character varying NOT NULL\n);\n\n\nALTER TABLE public.e2e_user_posts OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_authors e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_authors\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_posts USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_posts USING btree (user_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_posts e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.e2e_authors(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/up/12.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_authors; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_authors (\n    id uuid NOT NULL,\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_authors OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_posts (\n    id uuid NOT NULL,\n    author_id uuid NOT NULL,\n    slug character varying(32) NOT NULL,\n    content character varying(255) DEFAULT ''::character varying NOT NULL\n);\n\n\nALTER TABLE public.e2e_user_posts OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_authors e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_authors\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_posts USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_posts USING btree (author_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_posts e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (author_id) REFERENCES public.e2e_authors(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/up/13.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_authors; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_authors (\n    id uuid NOT NULL,\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_authors OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_posts (\n    id uuid NOT NULL,\n    author_id uuid,\n    slug character varying(32) NOT NULL,\n    content character varying(255) DEFAULT ''::character varying NOT NULL,\n    published boolean DEFAULT false NOT NULL\n);\n\n\nALTER TABLE public.e2e_user_posts OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_authors e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_authors\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_posts USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_posts USING btree (author_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_posts e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (author_id) REFERENCES public.e2e_authors(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/up/14.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_address; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_address (\n    id uuid NOT NULL\n);\n\n\nALTER TABLE public.e2e_address OWNER TO postgres;\n\n--\n-- Name: e2e_authors; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_authors (\n    id uuid NOT NULL,\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_authors OWNER TO postgres;\n\n--\n-- Name: e2e_flow; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_flow (\n    id uuid NOT NULL\n);\n\n\nALTER TABLE public.e2e_flow OWNER TO postgres;\n\n--\n-- Name: e2e_token; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_token (\n    id uuid NOT NULL,\n    token character varying(64) NOT NULL,\n    e2e_flow_id uuid NOT NULL,\n    e2e_address_id uuid NOT NULL\n);\n\n\nALTER TABLE public.e2e_token OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_posts (\n    id uuid NOT NULL,\n    author_id uuid,\n    slug character varying(32) NOT NULL,\n    content character varying(255) DEFAULT ''::character varying NOT NULL,\n    published boolean DEFAULT false NOT NULL\n);\n\n\nALTER TABLE public.e2e_user_posts OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_address e2e_address_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_address\n    ADD CONSTRAINT e2e_address_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_flow e2e_flow_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_flow\n    ADD CONSTRAINT e2e_flow_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_token e2e_token_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_token\n    ADD CONSTRAINT e2e_token_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_posts e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_authors e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_authors\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_token_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_token_idx ON public.e2e_token USING btree (token);\n\n\n--\n-- Name: e2e_token_uq_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_token_uq_idx ON public.e2e_token USING btree (token);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_posts USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_posts USING btree (author_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_token e2e_token_e2e_address_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_token\n    ADD CONSTRAINT e2e_token_e2e_address_id_fkey FOREIGN KEY (e2e_address_id) REFERENCES public.e2e_address(id) ON DELETE CASCADE;\n\n\n--\n-- Name: e2e_token e2e_token_e2e_flow_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_token\n    ADD CONSTRAINT e2e_token_e2e_flow_id_fkey FOREIGN KEY (e2e_flow_id) REFERENCES public.e2e_flow(id) ON DELETE CASCADE;\n\n\n--\n-- Name: e2e_user_posts e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (author_id) REFERENCES public.e2e_authors(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/up/15.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_address; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_address (\n    id uuid NOT NULL\n);\n\n\nALTER TABLE public.e2e_address OWNER TO postgres;\n\n--\n-- Name: e2e_authors; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_authors (\n    id uuid NOT NULL,\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_authors OWNER TO postgres;\n\n--\n-- Name: e2e_flow; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_flow (\n    id uuid NOT NULL\n);\n\n\nALTER TABLE public.e2e_flow OWNER TO postgres;\n\n--\n-- Name: e2e_token; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_token (\n    id uuid NOT NULL,\n    token character varying(64) NOT NULL,\n    e2e_flow_id uuid,\n    e2e_address_id uuid NOT NULL,\n    expires_at timestamp without time zone DEFAULT '2000-01-01 00:00:00'::timestamp without time zone NOT NULL,\n    issued_at timestamp without time zone DEFAULT '2000-01-01 00:00:00'::timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_token OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_posts (\n    id uuid NOT NULL,\n    author_id uuid,\n    slug character varying(32) NOT NULL,\n    content character varying(255) DEFAULT ''::character varying NOT NULL,\n    published boolean DEFAULT false NOT NULL\n);\n\n\nALTER TABLE public.e2e_user_posts OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_address e2e_address_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_address\n    ADD CONSTRAINT e2e_address_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_flow e2e_flow_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_flow\n    ADD CONSTRAINT e2e_flow_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_token e2e_token_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_token\n    ADD CONSTRAINT e2e_token_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_posts e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_authors e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_authors\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_token_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_token_idx ON public.e2e_token USING btree (token);\n\n\n--\n-- Name: e2e_token_uq_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_token_uq_idx ON public.e2e_token USING btree (token);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_posts USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_posts USING btree (author_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_token e2e_token_e2e_address_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_token\n    ADD CONSTRAINT e2e_token_e2e_address_id_fkey FOREIGN KEY (e2e_address_id) REFERENCES public.e2e_address(id) ON DELETE CASCADE;\n\n\n--\n-- Name: e2e_token e2e_token_e2e_flow_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_token\n    ADD CONSTRAINT e2e_token_e2e_flow_id_fkey FOREIGN KEY (e2e_flow_id) REFERENCES public.e2e_flow(id) ON DELETE CASCADE;\n\n\n--\n-- Name: e2e_user_posts e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (author_id) REFERENCES public.e2e_authors(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/up/2.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_user_notes; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_notes (\n    id uuid NOT NULL,\n    notes character varying(255),\n    user_id uuid NOT NULL\n);\n\n\nALTER TABLE public.e2e_user_notes OWNER TO postgres;\n\n--\n-- Name: e2e_users; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_users (\n    id uuid NOT NULL,\n    username character varying(255),\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_users OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_notes e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_notes\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_users e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_users\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_notes USING btree (user_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_notes e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_notes\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/up/3.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_user_notes; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_notes (\n    id uuid NOT NULL,\n    notes character varying(255),\n    user_id uuid NOT NULL,\n    slug character varying(64)\n);\n\n\nALTER TABLE public.e2e_user_notes OWNER TO postgres;\n\n--\n-- Name: e2e_users; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_users (\n    id uuid NOT NULL,\n    username character varying(255),\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_users OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_notes e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_notes\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_users e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_users\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_notes USING btree (user_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_notes e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_notes\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/up/4.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_user_notes; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_notes (\n    id uuid NOT NULL,\n    notes character varying(255),\n    user_id uuid NOT NULL,\n    slug character varying(64)\n);\n\n\nALTER TABLE public.e2e_user_notes OWNER TO postgres;\n\n--\n-- Name: e2e_users; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_users (\n    id uuid NOT NULL,\n    username character varying(255),\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_users OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_notes e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_notes\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_users e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_users\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_notes USING btree (user_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_notes e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_notes\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/up/5.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_user_notes; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_notes (\n    id uuid NOT NULL,\n    notes character varying(255),\n    user_id uuid NOT NULL,\n    slug character varying(64) NOT NULL\n);\n\n\nALTER TABLE public.e2e_user_notes OWNER TO postgres;\n\n--\n-- Name: e2e_users; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_users (\n    id uuid NOT NULL,\n    username character varying(255),\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_users OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_notes e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_notes\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_users e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_users\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_notes USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_notes USING btree (user_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_notes e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_notes\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/up/6.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_user_posts; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_posts (\n    id uuid NOT NULL,\n    notes character varying(255),\n    user_id uuid NOT NULL,\n    slug character varying(64) NOT NULL\n);\n\n\nALTER TABLE public.e2e_user_posts OWNER TO postgres;\n\n--\n-- Name: e2e_users; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_users (\n    id uuid NOT NULL,\n    username character varying(255),\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_users OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_users e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_users\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_posts USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_posts USING btree (user_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_posts e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/up/7.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_user_posts; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_posts (\n    id uuid NOT NULL,\n    user_id uuid NOT NULL,\n    slug character varying(64) NOT NULL,\n    content character varying(255) DEFAULT ''::character varying NOT NULL\n);\n\n\nALTER TABLE public.e2e_user_posts OWNER TO postgres;\n\n--\n-- Name: e2e_users; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_users (\n    id uuid NOT NULL,\n    username character varying(255),\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_users OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_users e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_users\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_posts USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_posts USING btree (user_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_posts e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/up/8.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_user_posts; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_posts (\n    id uuid NOT NULL,\n    user_id uuid NOT NULL,\n    slug character varying(64) NOT NULL,\n    content character varying(255) DEFAULT ''::character varying NOT NULL\n);\n\n\nALTER TABLE public.e2e_user_posts OWNER TO postgres;\n\n--\n-- Name: e2e_users; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_users (\n    id uuid NOT NULL,\n    name character varying(255),\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_users OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_users e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_users\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_posts USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_posts USING btree (user_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_posts e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/postgres/up/9.sql",
    "content": "--\n-- PostgreSQL database dump\n--\n\n-- Dumped from database version 9.6.19\n-- Dumped by pg_dump version 12.4\n\nSET statement_timeout = 0;\nSET lock_timeout = 0;\nSET idle_in_transaction_session_timeout = 0;\nSET client_encoding = 'UTF8';\nSET standard_conforming_strings = on;\nSELECT pg_catalog.set_config('search_path', '', false);\nSET check_function_bodies = false;\nSET xmloption = content;\nSET client_min_messages = warning;\nSET row_security = off;\n\nSET default_tablespace = '';\n\n--\n-- Name: e2e_user_posts; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_user_posts (\n    id uuid NOT NULL,\n    user_id uuid NOT NULL,\n    slug character varying(64) NOT NULL,\n    content character varying(255) DEFAULT ''::character varying NOT NULL\n);\n\n\nALTER TABLE public.e2e_user_posts OWNER TO postgres;\n\n--\n-- Name: e2e_users; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.e2e_users (\n    id uuid NOT NULL,\n    created_at timestamp without time zone NOT NULL,\n    updated_at timestamp without time zone NOT NULL\n);\n\n\nALTER TABLE public.e2e_users OWNER TO postgres;\n\n--\n-- Name: schema_migration; Type: TABLE; Schema: public; Owner: postgres\n--\n\nCREATE TABLE public.schema_migration (\n    version character varying(14) NOT NULL\n);\n\n\nALTER TABLE public.schema_migration OWNER TO postgres;\n\n--\n-- Name: e2e_user_posts e2e_user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_users e2e_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_users\n    ADD CONSTRAINT e2e_users_pkey PRIMARY KEY (id);\n\n\n--\n-- Name: e2e_user_notes_slug_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX e2e_user_notes_slug_idx ON public.e2e_user_posts USING btree (slug);\n\n\n--\n-- Name: e2e_user_notes_user_id_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE INDEX e2e_user_notes_user_id_idx ON public.e2e_user_posts USING btree (user_id);\n\n\n--\n-- Name: schema_migration_version_idx; Type: INDEX; Schema: public; Owner: postgres\n--\n\nCREATE UNIQUE INDEX schema_migration_version_idx ON public.schema_migration USING btree (version);\n\n\n--\n-- Name: e2e_user_posts e2e_user_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres\n--\n\nALTER TABLE ONLY public.e2e_user_posts\n    ADD CONSTRAINT e2e_user_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.e2e_users(id) ON DELETE CASCADE;\n\n\n--\n-- PostgreSQL database dump complete\n--\n\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/down/0.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/down/1.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_users\" (\n\"id\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n, \"username\" TEXT);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/down/10.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_users\" (\n\"id\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\nCREATE TABLE IF NOT EXISTS \"e2e_user_posts\" (\n\"id\" TEXT PRIMARY KEY,\n\"user_id\" char(36) NOT NULL,\n\"slug\" TEXT NOT NULL,\n\"content\" TEXT NOT NULL DEFAULT '',\nFOREIGN KEY (user_id) REFERENCES e2e_users (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_posts\" (slug);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_posts\" (user_id);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/down/11.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_users\" (\n\"id\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\nCREATE TABLE IF NOT EXISTS \"e2e_user_posts\" (\n\"id\" TEXT PRIMARY KEY,\n\"user_id\" char(36) NOT NULL,\n\"slug\" TEXT NOT NULL,\n\"content\" TEXT NOT NULL DEFAULT '',\nFOREIGN KEY (\"user_id\") REFERENCES \"e2e_users\" (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_posts\" (\"user_id\");\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_posts\" (slug);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/down/12.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_authors\" (\n\"id\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\nCREATE TABLE IF NOT EXISTS \"e2e_user_posts\" (\n\"id\" TEXT PRIMARY KEY,\n\"user_id\" char(36) NOT NULL,\n\"slug\" TEXT NOT NULL,\n\"content\" TEXT NOT NULL DEFAULT '',\nFOREIGN KEY (\"user_id\") REFERENCES e2e_authors (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_posts\" (\"user_id\");\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_posts\" (slug);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/down/13.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_authors\" (\n\"id\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\nCREATE TABLE IF NOT EXISTS \"e2e_user_posts\" (\n\"id\" TEXT PRIMARY KEY,\n\"author_id\" char(36) NOT NULL,\n\"slug\" TEXT NOT NULL,\n\"content\" TEXT NOT NULL DEFAULT '',\nFOREIGN KEY (author_id) REFERENCES e2e_authors (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_posts\" (author_id);\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_posts\" (slug);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/down/14.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_authors\" (\n\"id\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\nCREATE TABLE IF NOT EXISTS \"e2e_user_posts\" (\n\"id\" TEXT PRIMARY KEY,\n\"author_id\" char(36),\n\"slug\" TEXT NOT NULL,\n\"content\" TEXT NOT NULL DEFAULT '',\n\"published\" bool NOT NULL DEFAULT FALSE,\nFOREIGN KEY (author_id) REFERENCES e2e_authors (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_posts\" (slug);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_posts\" (author_id);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/down/15.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_authors\" (\n\"id\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\nCREATE TABLE IF NOT EXISTS \"e2e_user_posts\" (\n\"id\" TEXT PRIMARY KEY,\n\"author_id\" char(36),\n\"slug\" TEXT NOT NULL,\n\"content\" TEXT NOT NULL DEFAULT '',\n\"published\" bool NOT NULL DEFAULT FALSE,\nFOREIGN KEY (author_id) REFERENCES e2e_authors (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_posts\" (slug);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_posts\" (author_id);\nCREATE TABLE IF NOT EXISTS \"e2e_flow\" (\n\"id\" TEXT PRIMARY KEY\n);\nCREATE TABLE IF NOT EXISTS \"e2e_address\" (\n\"id\" TEXT PRIMARY KEY\n);\nCREATE TABLE IF NOT EXISTS \"e2e_token\" (\n\"id\" TEXT PRIMARY KEY,\n\"token\" TEXT NOT NULL,\n\"e2e_flow_id\" char(36) NOT NULL,\n\"e2e_address_id\" char(36) NOT NULL,\n\"expires_at\" DATETIME NOT NULL DEFAULT '2000-01-01 00:00:00',\n\"issued_at\" DATETIME NOT NULL DEFAULT '2000-01-01 00:00:00',\nFOREIGN KEY (e2e_flow_id) REFERENCES e2e_flow (id) ON UPDATE NO ACTION ON DELETE CASCADE,\nFOREIGN KEY (e2e_address_id) REFERENCES e2e_address (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE UNIQUE INDEX \"e2e_token_uq_idx\" ON \"e2e_token\" (token);\nCREATE INDEX \"e2e_token_idx\" ON \"e2e_token\" (token);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/down/2.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_users\" (\n\"id\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n, \"username\" TEXT);\nCREATE TABLE IF NOT EXISTS \"e2e_user_notes\" (\n\"id\" TEXT PRIMARY KEY,\n\"user_id\" char(36) NOT NULL,\n\"notes\" TEXT, \"title\" TEXT NOT NULL DEFAULT '',\nFOREIGN KEY (user_id) REFERENCES e2e_users (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_notes\" (user_id);\nCREATE INDEX \"e2e_user_notes_title_idx\" ON \"e2e_user_notes\" (title);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/down/3.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_users\" (\n\"id\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n, \"username\" TEXT);\nCREATE TABLE IF NOT EXISTS \"e2e_user_notes\" (\n\"id\" TEXT PRIMARY KEY,\n\"user_id\" char(36) NOT NULL,\n\"notes\" TEXT,\nFOREIGN KEY (user_id) REFERENCES e2e_users (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_notes\" (user_id);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/down/4.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_users\" (\n\"id\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n, \"username\" TEXT);\nCREATE TABLE IF NOT EXISTS \"e2e_user_notes\" (\n\"id\" TEXT PRIMARY KEY,\n\"user_id\" char(36) NOT NULL,\n\"slug\" TEXT NOT NULL, \"notes\" TEXT,\nFOREIGN KEY (user_id) REFERENCES e2e_users (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_notes\" (user_id);\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_notes\" (slug);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/down/5.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_users\" (\n\"id\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n, \"username\" TEXT);\nCREATE TABLE IF NOT EXISTS \"e2e_user_notes\" (\n\"id\" TEXT PRIMARY KEY,\n\"user_id\" char(36) NOT NULL,\n\"slug\" TEXT NOT NULL, \"notes\" TEXT,\nFOREIGN KEY (user_id) REFERENCES e2e_users (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_notes\" (user_id);\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_notes\" (slug);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/down/6.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_users\" (\n\"id\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n, \"username\" TEXT);\nCREATE TABLE IF NOT EXISTS \"e2e_user_notes\" (\n\"id\" TEXT PRIMARY KEY,\n\"user_id\" char(36) NOT NULL,\n\"slug\" TEXT NOT NULL, \"notes\" TEXT,\nFOREIGN KEY (user_id) REFERENCES e2e_users (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_notes\" (user_id);\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_notes\" (slug);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/down/7.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_users\" (\n\"id\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n, \"username\" TEXT);\nCREATE TABLE IF NOT EXISTS \"e2e_user_posts\" (\n\"id\" TEXT PRIMARY KEY,\n\"user_id\" char(36) NOT NULL,\n\"slug\" TEXT NOT NULL, \"notes\" TEXT,\nFOREIGN KEY (user_id) REFERENCES e2e_users (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_posts\" (user_id);\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_posts\" (slug);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/down/8.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_users\" (\n\"id\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n, \"username\" TEXT);\nCREATE TABLE IF NOT EXISTS \"e2e_user_posts\" (\n\"id\" TEXT PRIMARY KEY,\n\"user_id\" char(36) NOT NULL,\n\"slug\" TEXT NOT NULL,\n\"content\" TEXT NOT NULL DEFAULT '',\nFOREIGN KEY (user_id) REFERENCES e2e_users (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_posts\" (slug);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_posts\" (user_id);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/down/9.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_users\" (\n\"id\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n, \"name\" TEXT);\nCREATE TABLE IF NOT EXISTS \"e2e_user_posts\" (\n\"id\" TEXT PRIMARY KEY,\n\"user_id\" char(36) NOT NULL,\n\"slug\" TEXT NOT NULL,\n\"content\" TEXT NOT NULL DEFAULT '',\nFOREIGN KEY (user_id) REFERENCES e2e_users (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_posts\" (slug);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_posts\" (user_id);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/up/0.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_users\" (\n\"id\" TEXT PRIMARY KEY,\n\"username\" TEXT,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/up/1.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_users\" (\n\"id\" TEXT PRIMARY KEY,\n\"username\" TEXT,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\nCREATE TABLE IF NOT EXISTS \"e2e_user_notes\" (\n\"id\" TEXT PRIMARY KEY,\n\"notes\" TEXT,\n\"title\" TEXT NOT NULL DEFAULT '',\n\"user_id\" char(36) NOT NULL,\nFOREIGN KEY (user_id) REFERENCES e2e_users (id) ON DELETE cascade\n);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_notes\" (user_id);\nCREATE INDEX \"e2e_user_notes_title_idx\" ON \"e2e_user_notes\" (title);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/up/10.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_users\" (\n\"id\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\nCREATE TABLE IF NOT EXISTS \"e2e_user_posts\" (\n\"id\" TEXT PRIMARY KEY,\n\"user_id\" char(36) NOT NULL,\n\"slug\" TEXT NOT NULL,\n\"content\" TEXT NOT NULL DEFAULT '',\nFOREIGN KEY (user_id) REFERENCES e2e_users (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_posts\" (user_id);\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_posts\" (slug);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/up/11.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_authors\" (\n\"id\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\nCREATE TABLE IF NOT EXISTS \"e2e_user_posts\" (\n\"id\" TEXT PRIMARY KEY,\n\"user_id\" char(36) NOT NULL,\n\"slug\" TEXT NOT NULL,\n\"content\" TEXT NOT NULL DEFAULT '',\nFOREIGN KEY (user_id) REFERENCES \"e2e_authors\" (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_posts\" (user_id);\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_posts\" (slug);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/up/12.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_authors\" (\n\"id\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\nCREATE TABLE IF NOT EXISTS \"e2e_user_posts\" (\n\"id\" TEXT PRIMARY KEY,\n\"author_id\" char(36) NOT NULL,\n\"slug\" TEXT NOT NULL,\n\"content\" TEXT NOT NULL DEFAULT '',\nFOREIGN KEY (\"author_id\") REFERENCES \"e2e_authors\" (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_posts\" (\"author_id\");\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_posts\" (slug);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/up/13.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_authors\" (\n\"id\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\nCREATE TABLE IF NOT EXISTS \"e2e_user_posts\" (\n\"id\" TEXT PRIMARY KEY,\n\"author_id\" char(36),\n\"slug\" TEXT NOT NULL,\n\"content\" TEXT NOT NULL DEFAULT '',\n\"published\" bool NOT NULL DEFAULT FALSE,\nFOREIGN KEY (author_id) REFERENCES e2e_authors (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_posts\" (slug);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_posts\" (author_id);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/up/14.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_authors\" (\n\"id\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\nCREATE TABLE IF NOT EXISTS \"e2e_user_posts\" (\n\"id\" TEXT PRIMARY KEY,\n\"author_id\" char(36),\n\"slug\" TEXT NOT NULL,\n\"content\" TEXT NOT NULL DEFAULT '',\n\"published\" bool NOT NULL DEFAULT FALSE,\nFOREIGN KEY (author_id) REFERENCES e2e_authors (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_posts\" (slug);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_posts\" (author_id);\nCREATE TABLE IF NOT EXISTS \"e2e_flow\" (\n\"id\" TEXT PRIMARY KEY\n);\nCREATE TABLE IF NOT EXISTS \"e2e_address\" (\n\"id\" TEXT PRIMARY KEY\n);\nCREATE TABLE IF NOT EXISTS \"e2e_token\" (\n\"id\" TEXT PRIMARY KEY,\n\"token\" TEXT NOT NULL,\n\"e2e_flow_id\" char(36) NOT NULL,\n\"e2e_address_id\" char(36) NOT NULL,\nFOREIGN KEY (e2e_flow_id) REFERENCES e2e_flow (id) ON DELETE cascade,\nFOREIGN KEY (e2e_address_id) REFERENCES e2e_address (id) ON DELETE cascade\n);\nCREATE UNIQUE INDEX \"e2e_token_uq_idx\" ON \"e2e_token\" (token);\nCREATE INDEX \"e2e_token_idx\" ON \"e2e_token\" (token);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/up/15.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_authors\" (\n\"id\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\nCREATE TABLE IF NOT EXISTS \"e2e_user_posts\" (\n\"id\" TEXT PRIMARY KEY,\n\"author_id\" char(36),\n\"slug\" TEXT NOT NULL,\n\"content\" TEXT NOT NULL DEFAULT '',\n\"published\" bool NOT NULL DEFAULT FALSE,\nFOREIGN KEY (author_id) REFERENCES e2e_authors (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_posts\" (slug);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_posts\" (author_id);\nCREATE TABLE IF NOT EXISTS \"e2e_flow\" (\n\"id\" TEXT PRIMARY KEY\n);\nCREATE TABLE IF NOT EXISTS \"e2e_address\" (\n\"id\" TEXT PRIMARY KEY\n);\nCREATE TABLE IF NOT EXISTS \"e2e_token\" (\n\"id\" TEXT PRIMARY KEY,\n\"token\" TEXT NOT NULL,\n\"e2e_flow_id\" char(36),\n\"e2e_address_id\" char(36) NOT NULL,\n\"expires_at\" DATETIME NOT NULL DEFAULT '2000-01-01 00:00:00',\n\"issued_at\" DATETIME NOT NULL DEFAULT '2000-01-01 00:00:00',\nFOREIGN KEY (e2e_address_id) REFERENCES e2e_address (id) ON UPDATE NO ACTION ON DELETE CASCADE,\nFOREIGN KEY (e2e_flow_id) REFERENCES e2e_flow (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE INDEX \"e2e_token_idx\" ON \"e2e_token\" (token);\nCREATE UNIQUE INDEX \"e2e_token_uq_idx\" ON \"e2e_token\" (token);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/up/2.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_users\" (\n\"id\" TEXT PRIMARY KEY,\n\"username\" TEXT,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\nCREATE TABLE IF NOT EXISTS \"e2e_user_notes\" (\n\"id\" TEXT PRIMARY KEY,\n\"notes\" TEXT,\n\"user_id\" char(36) NOT NULL,\nFOREIGN KEY (user_id) REFERENCES e2e_users (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_notes\" (user_id);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/up/3.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_users\" (\n\"id\" TEXT PRIMARY KEY,\n\"username\" TEXT,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\nCREATE TABLE IF NOT EXISTS \"e2e_user_notes\" (\n\"id\" TEXT PRIMARY KEY,\n\"notes\" TEXT,\n\"user_id\" char(36) NOT NULL, \"slug\" TEXT,\nFOREIGN KEY (user_id) REFERENCES e2e_users (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_notes\" (user_id);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/up/4.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_users\" (\n\"id\" TEXT PRIMARY KEY,\n\"username\" TEXT,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\nCREATE TABLE IF NOT EXISTS \"e2e_user_notes\" (\n\"id\" TEXT PRIMARY KEY,\n\"notes\" TEXT,\n\"user_id\" char(36) NOT NULL, \"slug\" TEXT,\nFOREIGN KEY (user_id) REFERENCES e2e_users (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_notes\" (user_id);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/up/5.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_users\" (\n\"id\" TEXT PRIMARY KEY,\n\"username\" TEXT,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\nCREATE TABLE IF NOT EXISTS \"e2e_user_notes\" (\n\"id\" TEXT PRIMARY KEY,\n\"notes\" TEXT,\n\"user_id\" char(36) NOT NULL,\n\"slug\" TEXT NOT NULL,\nFOREIGN KEY (user_id) REFERENCES e2e_users (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_notes\" (user_id);\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_notes\" (slug);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/up/6.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_users\" (\n\"id\" TEXT PRIMARY KEY,\n\"username\" TEXT,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\nCREATE TABLE IF NOT EXISTS \"e2e_user_posts\" (\n\"id\" TEXT PRIMARY KEY,\n\"notes\" TEXT,\n\"user_id\" char(36) NOT NULL,\n\"slug\" TEXT NOT NULL,\nFOREIGN KEY (user_id) REFERENCES e2e_users (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_posts\" (user_id);\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_posts\" (slug);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/up/7.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_users\" (\n\"id\" TEXT PRIMARY KEY,\n\"username\" TEXT,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\nCREATE TABLE IF NOT EXISTS \"e2e_user_posts\" (\n\"id\" TEXT PRIMARY KEY,\n\"user_id\" char(36) NOT NULL,\n\"slug\" TEXT NOT NULL,\n\"content\" TEXT NOT NULL DEFAULT '',\nFOREIGN KEY (user_id) REFERENCES e2e_users (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_posts\" (slug);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_posts\" (user_id);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/up/8.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_users\" (\n\"id\" TEXT PRIMARY KEY,\n\"name\" TEXT,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\nCREATE TABLE IF NOT EXISTS \"e2e_user_posts\" (\n\"id\" TEXT PRIMARY KEY,\n\"user_id\" char(36) NOT NULL,\n\"slug\" TEXT NOT NULL,\n\"content\" TEXT NOT NULL DEFAULT '',\nFOREIGN KEY (user_id) REFERENCES e2e_users (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_posts\" (slug);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_posts\" (user_id);\n"
  },
  {
    "path": "testdata/e2e/fixtures/sqlite3/up/9.sql",
    "content": "CREATE TABLE IF NOT EXISTS \"schema_migration\" (\n\"version\" TEXT NOT NULL\n);\nCREATE UNIQUE INDEX \"schema_migration_version_idx\" ON \"schema_migration\" (version);\nCREATE TABLE IF NOT EXISTS \"e2e_user_posts\" (\n\"id\" TEXT PRIMARY KEY,\n\"user_id\" char(36) NOT NULL,\n\"slug\" TEXT NOT NULL,\n\"content\" TEXT NOT NULL DEFAULT '',\nFOREIGN KEY (user_id) REFERENCES e2e_users (id) ON UPDATE NO ACTION ON DELETE CASCADE\n);\nCREATE UNIQUE INDEX \"e2e_user_notes_slug_idx\" ON \"e2e_user_posts\" (slug);\nCREATE INDEX \"e2e_user_notes_user_id_idx\" ON \"e2e_user_posts\" (user_id);\nCREATE TABLE IF NOT EXISTS \"e2e_users\" (\n\"id\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\n"
  },
  {
    "path": "testdata/e2e/go.mod",
    "content": "module e2e\n\ngo 1.16\n\nrequire (\n\tgithub.com/gobuffalo/pop/v6 v6.0.4\n\tgithub.com/jackc/pgx/v4 v4.16.1\n\tgithub.com/stretchr/testify v1.8.0\n)\n"
  },
  {
    "path": "testdata/e2e/go.sum",
    "content": "cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=\ncloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=\ncloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=\ncloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=\ncloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=\ncloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=\ncloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=\ncloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=\ncloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=\ncloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=\ncloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=\ncloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=\ncloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=\ncloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=\ncloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=\ncloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=\ncloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=\ncloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=\ncloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=\ncloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=\ncloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=\ncloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=\ncloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=\ncloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=\ncloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=\ncloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=\ncloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=\ncloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=\ncloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=\ncloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=\ncloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=\ncloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=\ncloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=\ncloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=\ncloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=\ncloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=\ndmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=\ngithub.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=\ngithub.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=\ngithub.com/Masterminds/semver/v3 v3.0.3/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=\ngithub.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=\ngithub.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=\ngithub.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=\ngithub.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=\ngithub.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=\ngithub.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=\ngithub.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=\ngithub.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=\ngithub.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=\ngithub.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM=\ngithub.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=\ngithub.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=\ngithub.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=\ngithub.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=\ngithub.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=\ngithub.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=\ngithub.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=\ngithub.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=\ngithub.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=\ngithub.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=\ngithub.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=\ngithub.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=\ngithub.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=\ngithub.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=\ngithub.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=\ngithub.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=\ngithub.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=\ngithub.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=\ngithub.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=\ngithub.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=\ngithub.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=\ngithub.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=\ngithub.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=\ngithub.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=\ngithub.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=\ngithub.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=\ngithub.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=\ngithub.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=\ngithub.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=\ngithub.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=\ngithub.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=\ngithub.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=\ngithub.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=\ngithub.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=\ngithub.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=\ngithub.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=\ngithub.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=\ngithub.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=\ngithub.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=\ngithub.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=\ngithub.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=\ngithub.com/gobuffalo/attrs v1.0.1/go.mod h1:qGdnq2RukKtBl4ASJit0OFckc5XGSyTFk98SvRpMFrQ=\ngithub.com/gobuffalo/envy v1.10.1 h1:ppDLoXv2feQ5nus4IcgtyMdHQkKng2lhJCIm33cblM0=\ngithub.com/gobuffalo/envy v1.10.1/go.mod h1:AWx4++KnNOW3JOeEvhSaq+mvgAvnMYOY1XSIin4Mago=\ngithub.com/gobuffalo/fizz v1.10.0/go.mod h1:J2XGPO0AfJ1zKw7+2BA+6FEGAkyEsdCOLvN93WCT2WI=\ngithub.com/gobuffalo/fizz v1.14.0 h1:hicZBYSwSWITXEDUR77tqrLU1/vScXHddd02IaFkkPI=\ngithub.com/gobuffalo/fizz v1.14.0/go.mod h1:0aF1kAZYCfKqbLM/lmZ3jXFyqqWE/kY/nIOKnNdAYXQ=\ngithub.com/gobuffalo/flect v0.2.0/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80=\ngithub.com/gobuffalo/flect v0.2.4/go.mod h1:1ZyCLIbg0YD7sDkzvFdPoOydPtD8y9JQnrOROolUcM8=\ngithub.com/gobuffalo/flect v0.2.5 h1:H6vvsv2an0lalEaCDRThvtBfmg44W/QHXBCYUXf/6S4=\ngithub.com/gobuffalo/flect v0.2.5/go.mod h1:1ZyCLIbg0YD7sDkzvFdPoOydPtD8y9JQnrOROolUcM8=\ngithub.com/gobuffalo/genny/v2 v2.0.8/go.mod h1:R45scCyQfff2HysNJHNanjrpvPw4Qu+rM1MOMDBB5oU=\ngithub.com/gobuffalo/genny/v2 v2.0.9/go.mod h1:R45scCyQfff2HysNJHNanjrpvPw4Qu+rM1MOMDBB5oU=\ngithub.com/gobuffalo/github_flavored_markdown v1.1.0/go.mod h1:TSpTKWcRTI0+v7W3x8dkSKMLJSUpuVitlptCkpeY8ic=\ngithub.com/gobuffalo/github_flavored_markdown v1.1.1 h1:kUf8ginyBOTRXcKSTPsPAqlA25vQ80+xAspLIYaxmTU=\ngithub.com/gobuffalo/github_flavored_markdown v1.1.1/go.mod h1:yU32Pen+eorS58oxh/bNZx76zUOCJwmvyV5FBrvzOKQ=\ngithub.com/gobuffalo/helpers v0.6.0/go.mod h1:pncVrer7x/KRvnL5aJABLAuT/RhKRR9klL6dkUOhyv8=\ngithub.com/gobuffalo/helpers v0.6.4 h1:N9is8xgaotJzGIge1GoLYiWRpKZPqnS9RSty72OhIn8=\ngithub.com/gobuffalo/helpers v0.6.4/go.mod h1:m2aOKsTl3KB0RUwwpxf3tykaaitujQ3irivqrlNAcJ0=\ngithub.com/gobuffalo/logger v1.0.6/go.mod h1:J31TBEHR1QLV2683OXTAItYIg8pv2JMHnF/quuAbMjs=\ngithub.com/gobuffalo/nulls v0.4.1 h1:k7QVCJfMplv9VRQQLb4N1d8tXUdGvcdMNfp4BfMnG2M=\ngithub.com/gobuffalo/nulls v0.4.1/go.mod h1:pp8e1hWTRJZFpMl4fj/CVbSMlaxjeGKkFq4RuBZi3w8=\ngithub.com/gobuffalo/packd v1.0.1/go.mod h1:PP2POP3p3RXGz7Jh6eYEf93S7vA2za6xM7QT85L4+VY=\ngithub.com/gobuffalo/plush/v4 v4.0.0/go.mod h1:ErFS3UxKqEb8fpFJT7lYErfN/Nw6vHGiDMTjxpk5bQ0=\ngithub.com/gobuffalo/plush/v4 v4.1.9/go.mod h1:9OOII9uAM5pZnhWu1OkQnboXJjaWMQ7kcTl3zNcxvTM=\ngithub.com/gobuffalo/plush/v4 v4.1.11 h1:IOLBE07W0VkiraJf36x547l3q5Ek3osP9vHzN48wAh0=\ngithub.com/gobuffalo/plush/v4 v4.1.11/go.mod h1:9OOII9uAM5pZnhWu1OkQnboXJjaWMQ7kcTl3zNcxvTM=\ngithub.com/gobuffalo/pop/v6 v6.0.0/go.mod h1:5rd3OnViLhjteR8+0i/mT9Q4CzkTzCoR7tm/9mmAic4=\ngithub.com/gobuffalo/pop/v6 v6.0.4 h1:ayJcBapz8usirToDprc7hPwB5AC66SD1ngrnr4RiWBc=\ngithub.com/gobuffalo/pop/v6 v6.0.4/go.mod h1:dFcrMNPOwk+sl1Oa0lOb/jGbmjv+JV+5CZjMWNYR3KI=\ngithub.com/gobuffalo/tags/v3 v3.0.2/go.mod h1:ZQeN6TCTiwAFnS0dNcbDtSgZDwNKSpqajvVtt6mlYpA=\ngithub.com/gobuffalo/tags/v3 v3.1.2 h1:68sHcwFFDstXyfbk5ovbGcQFDsupgVLs+lw1XZinHJw=\ngithub.com/gobuffalo/tags/v3 v3.1.2/go.mod h1:o3ldUfKv50jxWAC8eZHXMm8dnKW3YvyZUMr0xqUcZTI=\ngithub.com/gobuffalo/validate/v3 v3.0.0/go.mod h1:HFpjq+AIiA2RHoQnQVTFKF/ZpUPXwyw82LgyDPxQ9r0=\ngithub.com/gobuffalo/validate/v3 v3.3.1 h1:5YLQL22YARUsYS5ZGsPU6TrD0Utiu53N1JJ5qi+foYk=\ngithub.com/gobuffalo/validate/v3 v3.3.1/go.mod h1:Ehu8ieNJQuUM4peDDr/0VapzdGA7RgTc3wbe51vHfS0=\ngithub.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=\ngithub.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=\ngithub.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=\ngithub.com/gofrs/uuid v4.1.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=\ngithub.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0=\ngithub.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=\ngithub.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=\ngithub.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=\ngithub.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=\ngithub.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=\ngithub.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=\ngithub.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=\ngithub.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=\ngithub.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=\ngithub.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=\ngithub.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=\ngithub.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=\ngithub.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=\ngithub.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=\ngithub.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=\ngithub.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=\ngithub.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=\ngithub.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=\ngithub.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=\ngithub.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=\ngithub.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=\ngithub.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=\ngithub.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=\ngithub.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=\ngithub.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=\ngithub.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=\ngithub.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=\ngithub.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=\ngithub.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=\ngithub.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=\ngithub.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=\ngithub.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=\ngithub.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=\ngithub.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=\ngithub.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=\ngithub.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=\ngithub.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=\ngithub.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY=\ngithub.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c=\ngithub.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=\ngithub.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=\ngithub.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=\ngithub.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=\ngithub.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=\ngithub.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=\ngithub.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=\ngithub.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=\ngithub.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=\ngithub.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=\ngithub.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=\ngithub.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=\ngithub.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=\ngithub.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=\ngithub.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=\ngithub.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=\ngithub.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=\ngithub.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=\ngithub.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=\ngithub.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=\ngithub.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=\ngithub.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=\ngithub.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=\ngithub.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=\ngithub.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0=\ngithub.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=\ngithub.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=\ngithub.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8=\ngithub.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=\ngithub.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA=\ngithub.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE=\ngithub.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s=\ngithub.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o=\ngithub.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY=\ngithub.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=\ngithub.com/jackc/pgconn v1.10.0/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=\ngithub.com/jackc/pgconn v1.10.1/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=\ngithub.com/jackc/pgconn v1.12.1 h1:rsDFzIpRk7xT4B8FufgpCCeyjdNpKyghZeSefViE5W8=\ngithub.com/jackc/pgconn v1.12.1/go.mod h1:ZkhRC59Llhrq3oSfrikvwQ5NaxYExr6twkdkMLaKono=\ngithub.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=\ngithub.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8=\ngithub.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE=\ngithub.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c=\ngithub.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5Wi/+Zz7xoE5ALHsRQlOctkOiHc=\ngithub.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak=\ngithub.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=\ngithub.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=\ngithub.com/jackc/pgproto3 v1.1.0 h1:FYYE4yRw+AgI8wXIinMlNjBbp/UitDJwfj5LqqewP1A=\ngithub.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78=\ngithub.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA=\ngithub.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg=\ngithub.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=\ngithub.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=\ngithub.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=\ngithub.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=\ngithub.com/jackc/pgproto3/v2 v2.3.0 h1:brH0pCGBDkBW07HWlN/oSBXrmo3WB0UvZd1pIuDcL8Y=\ngithub.com/jackc/pgproto3/v2 v2.3.0/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=\ngithub.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg=\ngithub.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=\ngithub.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg=\ngithub.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc=\ngithub.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw=\ngithub.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM=\ngithub.com/jackc/pgtype v1.8.1/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=\ngithub.com/jackc/pgtype v1.11.0 h1:u4uiGPz/1hryuXzyaBhSk6dnIyyG2683olG2OV+UUgs=\ngithub.com/jackc/pgtype v1.11.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=\ngithub.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y=\ngithub.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=\ngithub.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=\ngithub.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs=\ngithub.com/jackc/pgx/v4 v4.13.0/go.mod h1:9P4X524sErlaxj0XSGZk7s+LD0eOyu1ZDUrrpznYDF0=\ngithub.com/jackc/pgx/v4 v4.16.1 h1:JzTglcal01DrghUqt+PmzWsZx/Yh7SC/CTQmSBMTd0Y=\ngithub.com/jackc/pgx/v4 v4.16.1/go.mod h1:SIhx0D5hoADaiXZVyv+3gSm3LCIIINTVO0PficsvWGQ=\ngithub.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=\ngithub.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=\ngithub.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=\ngithub.com/jackc/puddle v1.2.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=\ngithub.com/jmoiron/sqlx v1.3.4/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ=\ngithub.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g=\ngithub.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ=\ngithub.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg=\ngithub.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=\ngithub.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=\ngithub.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=\ngithub.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=\ngithub.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=\ngithub.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=\ngithub.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=\ngithub.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=\ngithub.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=\ngithub.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=\ngithub.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=\ngithub.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=\ngithub.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=\ngithub.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=\ngithub.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=\ngithub.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=\ngithub.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=\ngithub.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=\ngithub.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=\ngithub.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=\ngithub.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=\ngithub.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=\ngithub.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=\ngithub.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=\ngithub.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs=\ngithub.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=\ngithub.com/luna-duclos/instrumentedsql v1.1.3 h1:t7mvC0z1jUt5A0UQ6I/0H31ryymuQRnJcWCiqV3lSAA=\ngithub.com/luna-duclos/instrumentedsql v1.1.3/go.mod h1:9J1njvFds+zN7y85EDhN9XNQLANWwZt2ULeIC8yMNYs=\ngithub.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=\ngithub.com/markbates/oncer v1.0.0/go.mod h1:Z59JA581E9GP6w96jai+TGqafHPW+cPfRxz2aSZ0mcI=\ngithub.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0=\ngithub.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=\ngithub.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=\ngithub.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=\ngithub.com/mattn/go-colorable v0.1.9 h1:sqDoxXbdeALODt0DAeJCVp38ps9ZogZEAXjus69YV3U=\ngithub.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=\ngithub.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=\ngithub.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=\ngithub.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=\ngithub.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=\ngithub.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=\ngithub.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=\ngithub.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=\ngithub.com/mattn/go-sqlite3 v1.14.9 h1:10HX2Td0ocZpYEjhilsuo6WWtUqttj2Kb0KtD86/KYA=\ngithub.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=\ngithub.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc=\ngithub.com/microcosm-cc/bluemonday v1.0.16 h1:kHmAq2t7WPWLjiGvzKa5o3HzSfahUKiOq7fAPUiMNIc=\ngithub.com/microcosm-cc/bluemonday v1.0.16/go.mod h1:Z0r70sCuXHig8YpBzCc5eGHAap2K7e/u082ZUpDRRqM=\ngithub.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=\ngithub.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=\ngithub.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=\ngithub.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=\ngithub.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=\ngithub.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=\ngithub.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=\ngithub.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=\ngithub.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=\ngithub.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=\ngithub.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=\ngithub.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=\ngithub.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=\ngithub.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=\ngithub.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=\ngithub.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=\ngithub.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=\ngithub.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=\ngithub.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=\ngithub.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=\ngithub.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=\ngithub.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=\ngithub.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8=\ngithub.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=\ngithub.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=\ngithub.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=\ngithub.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=\ngithub.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=\ngithub.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=\ngithub.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=\ngithub.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=\ngithub.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=\ngithub.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=\ngithub.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=\ngithub.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=\ngithub.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=\ngithub.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=\ngithub.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=\ngithub.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=\ngithub.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=\ngithub.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=\ngithub.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=\ngithub.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=\ngithub.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=\ngithub.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d h1:yKm7XZV6j9Ev6lojP2XaIshpT4ymkqhMeSghO5Ps00E=\ngithub.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE=\ngithub.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e h1:qpG93cPwA5f7s/ZPBJnGOYQNK/vKsaDaseuKT5Asee8=\ngithub.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA=\ngithub.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=\ngithub.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=\ngithub.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk=\ngithub.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g=\ngithub.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=\ngithub.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=\ngithub.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns=\ngithub.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=\ngithub.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=\ngithub.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=\ngithub.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=\ngithub.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=\ngithub.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=\ngithub.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=\ngithub.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=\ngithub.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=\ngithub.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=\ngithub.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=\ngithub.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=\ngo.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=\ngo.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=\ngo.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ=\ngo.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=\ngo.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=\ngo.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=\ngo.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=\ngo.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=\ngo.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=\ngo.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=\ngo.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=\ngo.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=\ngo.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=\ngo.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=\ngo.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=\ngo.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=\ngo.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=\ngo.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=\ngo.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=\ngo.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=\ngo.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=\ngo.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=\ngo.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=\ngo.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=\ngolang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=\ngolang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=\ngolang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=\ngolang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=\ngolang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=\ngolang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 h1:/UOmuWzQfxxo9UtlXMwuQU8CMgg1eZXqTRwkSQJWKOI=\ngolang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=\ngolang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=\ngolang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=\ngolang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=\ngolang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=\ngolang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=\ngolang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=\ngolang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=\ngolang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=\ngolang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=\ngolang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=\ngolang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=\ngolang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=\ngolang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=\ngolang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=\ngolang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=\ngolang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=\ngolang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=\ngolang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=\ngolang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=\ngolang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=\ngolang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=\ngolang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=\ngolang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=\ngolang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=\ngolang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=\ngolang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY=\ngolang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=\ngolang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=\ngolang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=\ngolang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210809222454-d867a43fc93e h1:WUoyKPm6nCo1BnNUvPGnFG3T5DUVem42yDJZZ4CNxMA=\ngolang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=\ngolang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=\ngolang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=\ngolang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=\ngolang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=\ngolang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=\ngolang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=\ngolang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=\ngolang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=\ngolang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=\ngolang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=\ngolang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=\ngolang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=\ngolang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=\ngolang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=\ngolang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=\ngolang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=\ngolang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngoogle.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=\ngoogle.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=\ngoogle.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=\ngoogle.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=\ngoogle.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=\ngoogle.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=\ngoogle.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=\ngoogle.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=\ngoogle.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=\ngoogle.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=\ngoogle.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=\ngoogle.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=\ngoogle.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=\ngoogle.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=\ngoogle.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=\ngoogle.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=\ngoogle.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8=\ngoogle.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=\ngoogle.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=\ngoogle.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=\ngoogle.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=\ngoogle.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=\ngoogle.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=\ngoogle.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=\ngoogle.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=\ngoogle.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=\ngoogle.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=\ngoogle.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=\ngoogle.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=\ngoogle.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=\ngoogle.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=\ngoogle.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=\ngoogle.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=\ngoogle.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=\ngoogle.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=\ngoogle.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=\ngoogle.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=\ngoogle.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=\ngoogle.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=\ngoogle.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=\ngoogle.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=\ngoogle.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=\ngoogle.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=\ngoogle.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=\ngoogle.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=\ngoogle.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=\ngoogle.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=\ngoogle.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=\ngoogle.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=\ngoogle.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=\ngoogle.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=\ngoogle.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=\ngoogle.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=\ngoogle.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=\ngoogle.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=\ngoogle.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=\ngoogle.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=\ngoogle.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=\ngoogle.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=\ngoogle.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=\ngoogle.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=\ngoogle.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=\ngoogle.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=\ngopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=\ngopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=\ngopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=\ngopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=\ngopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=\ngopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=\ngopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=\ngopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\nhonnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=\nhonnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=\nhonnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=\nrsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=\nrsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=\nrsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=\n"
  },
  {
    "path": "testdata/e2e/integration_test.go",
    "content": "// +build e2e\n\npackage e2e_test\n\nimport (\n\t\"os\"\n\t\"testing\"\n\n\t\"github.com/gobuffalo/pop/v6\"\n\t_ \"github.com/jackc/pgx/v4/stdlib\"\n\t\"github.com/stretchr/testify/require\"\n\t\"github.com/stretchr/testify/suite\"\n)\n\nfunc TestSpecificSuites(t *testing.T) {\n\trequire.NoError(t, pop.LoadConfigFile())\n\n\tswitch d := os.Getenv(\"SODA_DIALECT\"); d {\n\tcase \"postgres\":\n\t\tsuite.Run(t, &PostgreSQLSuite{})\n\tcase \"cockroach\":\n\t\tsuite.Run(t, &CockroachSuite{})\n\tcase \"mysql\":\n\t\tsuite.Run(t, &MySQLSuite{})\n\tcase \"sqlite\":\n\t\tsuite.Run(t, &SQLiteSuite{})\n\tdefault:\n\t\tt.Fatalf(\"Got unsupported dialect: %s\", d)\n\t}\n}\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000001_users.down.fizz",
    "content": "drop_table(\"e2e_users\")\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000001_users.up.fizz",
    "content": "create_table(\"e2e_users\") {\n    t.Column(\"id\", \"uuid\", {\"primary\": true})\n    t.Column(\"username\", \"string\", {\"null\": true})\n}\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000002_user_notes.down.fizz",
    "content": "drop_table(\"e2e_user_notes\")\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000002_user_notes.up.fizz",
    "content": "create_table(\"e2e_user_notes\") {\n    t.Column(\"id\", \"uuid\", {\"primary\": true})\n    t.Column(\"notes\", \"string\", {\"null\": true})\n    t.Column(\"title\", \"string\", {\"size\": 64, \"default\": \"\"})\n\n    t.Column(\"user_id\", \"uuid\")\n    t.ForeignKey(\"user_id\", {\"e2e_users\": [\"id\"]}, {\"on_delete\": \"cascade\"})\n\n    t.DisableTimestamps()\n}\n\nadd_index(\"e2e_user_notes\", \"user_id\", {\"name\": \"e2e_user_notes_user_id_idx\"})\nadd_index(\"e2e_user_notes\", \"title\", {\"name\": \"e2e_user_notes_title_idx\"})\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000003_user_notes_drop_title.down.fizz",
    "content": "add_column(\"e2e_user_notes\", \"title\", \"string\", { \"default\": \"\", \"size\": 64 })\nadd_index(\"e2e_user_notes\", \"title\", {\"name\": \"e2e_user_notes_title_idx\"})\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000003_user_notes_drop_title.up.fizz",
    "content": "drop_column(\"e2e_user_notes\", \"title\")\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000004_user_notes_add_slug.down.fizz",
    "content": "drop_column(\"e2e_user_notes\", \"slug\")\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000004_user_notes_add_slug.up.fizz",
    "content": "add_column(\"e2e_user_notes\", \"slug\", \"string\", { \"null\": true, \"size\": 64 })\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000005_user_notes_add_slug.down.fizz",
    "content": ""
  },
  {
    "path": "testdata/e2e/migrations/20191100000005_user_notes_add_slug.up.fizz",
    "content": "sql(\"UPDATE e2e_user_notes SET slug='';\")\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000006_user_notes_add_slug.down.fizz",
    "content": ""
  },
  {
    "path": "testdata/e2e/migrations/20191100000006_user_notes_add_slug.up.fizz",
    "content": "change_column(\"e2e_user_notes\", \"slug\", \"string\", { \"size\": 64 })\nadd_index(\"e2e_user_notes\", \"slug\", { \"unique\":true, \"name\": \"e2e_user_notes_slug_idx\"})\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000007_user_notes_rename.down.fizz",
    "content": "rename_table(\"e2e_user_posts\",\"e2e_user_notes\")\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000007_user_notes_rename.up.fizz",
    "content": "rename_table(\"e2e_user_notes\", \"e2e_user_posts\")\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000008_user_notes_rename_notes.down.fizz",
    "content": "drop_column(\"e2e_user_posts\", \"content\")\nadd_column(\"e2e_user_posts\", \"notes\", \"string\", {\"null\": true})\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000008_user_notes_rename_notes.up.fizz",
    "content": "add_column(\"e2e_user_posts\", \"content\", \"string\", {\"default\": \"\"})\ndrop_column(\"e2e_user_posts\", \"notes\")\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000009_users_username.down.fizz",
    "content": "rename_column(\"e2e_users\", \"name\", \"username\")\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000009_users_username.up.fizz",
    "content": "rename_column(\"e2e_users\", \"username\", \"name\")\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000010_users_drop_name.down.fizz",
    "content": "add_column(\"e2e_users\", \"name\", \"string\", {\"null\": true})\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000010_users_drop_name.up.fizz",
    "content": "drop_column(\"e2e_users\", \"name\")\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000011_user_posts_change_column.down.fizz",
    "content": "change_column(\"e2e_user_posts\", \"slug\", \"string\", { \"size\": 64 })\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000011_user_posts_change_column.up.fizz",
    "content": "change_column(\"e2e_user_posts\", \"slug\", \"string\", { \"size\": 32 })"
  },
  {
    "path": "testdata/e2e/migrations/20191100000012_rename_user.down.fizz",
    "content": "rename_table(\"e2e_authors\", \"e2e_users\")\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000012_rename_user.up.fizz",
    "content": "rename_table(\"e2e_users\", \"e2e_authors\")\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000013_rename_user_notes_user.down.fizz",
    "content": "rename_column(\"e2e_user_posts\", \"author_id\", \"user_id\")\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000013_rename_user_notes_user.up.fizz",
    "content": "rename_column(\"e2e_user_posts\", \"user_id\", \"author_id\")\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000014_rename_user_add_published.down.fizz",
    "content": "drop_column(\"e2e_user_posts\", \"published\")\nchange_column(\"e2e_user_posts\", \"author_id\", \"uuid\")\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000014_rename_user_add_published.up.fizz",
    "content": "add_column(\"e2e_user_posts\", \"published\", \"bool\", {\"default_raw\": \"FALSE\"})\nchange_column(\"e2e_user_posts\", \"author_id\", \"uuid\", {\"null\": true})\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000015_auto_fk.down.fizz",
    "content": "drop_table(\"e2e_token\")\ndrop_table(\"e2e_flow\")\ndrop_table(\"e2e_address\")\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000015_auto_fk.up.fizz",
    "content": "create_table(\"e2e_flow\") {\n    t.DisableTimestamps()\n\n    t.Column(\"id\", \"uuid\", {\"primary\": true})\n}\n\ncreate_table(\"e2e_address\") {\n    t.DisableTimestamps()\n\n    t.Column(\"id\", \"uuid\", {\"primary\": true})\n}\n\ncreate_table(\"e2e_token\") {\n    t.DisableTimestamps()\n\n    t.Column(\"id\", \"uuid\", {\"primary\": true})\n\n    t.Column(\"token\", \"string\", {\"size\": 64})\n\n    t.Column(\"e2e_flow_id\", \"uuid\")\n    t.ForeignKey(\"e2e_flow_id\", {\"e2e_flow\": [\"id\"]}, {\"on_delete\": \"cascade\"})\n\n    t.Column(\"e2e_address_id\", \"uuid\")\n    t.ForeignKey(\"e2e_address_id\", {\"e2e_address\": [\"id\"]}, {\"on_delete\": \"cascade\"})\n}\n\nadd_index(\"e2e_token\", [\"token\"], { \"unique\": true, \"name\": \"e2e_token_uq_idx\" })\nadd_index(\"e2e_token\", [\"token\"], { \"name\": \"e2e_token_idx\" })\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000016_rename_auto_fk.down.fizz",
    "content": "change_column(\"e2e_token\", \"e2e_flow_id\", \"uuid\")\n"
  },
  {
    "path": "testdata/e2e/migrations/20191100000016_rename_auto_fk.up.fizz",
    "content": "add_column(\"e2e_token\", \"expires_at\", \"timestamp\", { \"default\": \"2000-01-01 00:00:00\" })\nadd_column(\"e2e_token\", \"issued_at\", \"timestamp\", { \"default\": \"2000-01-01 00:00:00\" })\nchange_column(\"e2e_token\", \"e2e_flow_id\", \"uuid\", {\"null\": true})\n"
  },
  {
    "path": "testdata/e2e/migrator_test.go",
    "content": "package e2e_test\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/gobuffalo/pop/v6\"\n\t\"github.com/stretchr/testify/require\"\n\t\"github.com/stretchr/testify/suite\"\n)\n\nfunc run(s *suite.Suite, c *pop.Connection, checkSchema func()) {\n\tr := s.Require()\n\n\tdest, err := ioutil.TempDir(os.TempDir(), \"fizz-up-integration\")\n\tr.NoError(err)\n\n\tm, err := pop.NewFileMigrator(\"./migrations\", c)\n\tr.NoError(err)\n\tm.SchemaPath = dest\n\n\trefreshFixtures, _ := strconv.ParseBool(os.Getenv(\"REFRESH_FIXTURES\"))\n\n\tactualFilePath := filepath.Join(dest, \"schema.sql\")\n\n\t// k is be the number of migrations that should run\n\ts.Run(\"direction=up\", func() {\n\t\tfor k := 0; k < len(m.UpMigrations.Migrations); k++ {\n\t\t\tr := s.Require()\n\n\t\t\t_, err := m.UpTo(1)\n\t\t\tr.NoError(err)\n\t\t\tr.NoError(m.DumpMigrationSchema())\n\t\t\texpectedFilePath := filepath.Join(\"fixtures\", c.Dialect.Name(), \"up\", fmt.Sprintf(\"%d.sql\", k))\n\n\t\t\tif refreshFixtures {\n\t\t\t\tcontent, err := ioutil.ReadFile(actualFilePath)\n\t\t\t\tr.NoError(err)\n\t\t\t\tr.NoError(ioutil.WriteFile(expectedFilePath, content, 0666))\n\t\t\t} else {\n\t\t\t\t_ = expectEqualFiles(s, expectedFilePath, actualFilePath)\n\t\t\t}\n\t\t}\n\t})\n\n\ts.Run(\"check=schema\", checkSchema)\n\n\ts.Run(\"direction=down\", func() {\n\t\tfor k := len(m.DownMigrations.Migrations) - 1; k >= 0; k-- {\n\t\t\tr := s.Require()\n\n\t\t\tr.NoError(m.Down(1))\n\t\t\tr.NoError(m.DumpMigrationSchema())\n\t\t\texpectedFilePath := filepath.Join(\"fixtures\", c.Dialect.Name(), \"down\", fmt.Sprintf(\"%d.sql\", k))\n\n\t\t\tif refreshFixtures {\n\t\t\t\tcontent, err := ioutil.ReadFile(actualFilePath)\n\t\t\t\tr.NoError(err)\n\t\t\t\tr.NoError(ioutil.WriteFile(expectedFilePath, content, 0666))\n\t\t\t} else {\n\t\t\t\t_ = expectEqualFiles(s, expectedFilePath, actualFilePath)\n\t\t\t}\n\t\t}\n\t})\n}\n\nfunc expectEqualFiles(s *suite.Suite, expected, actual string) bool {\n\tA := s.Assert()\n\tac, err := ioutil.ReadFile(actual)\n\tA.NoError(err)\n\n\tec, err := ioutil.ReadFile(expected)\n\tA.NoError(err)\n\n\tA.EqualValues(\n\t\tnormalizeDump(string(ec)),\n\t\tnormalizeDump(string(ac)),\n\t\t`\nexpected file:\t%s\nactual file: \t%s\nactual SQL dump:\n\n%s\n`, expected, actual, ac)\n\n\treturn normalizeDump(string(ec)) ==\n\t\tnormalizeDump(string(ac))\n}\n\nvar spaces = regexp.MustCompile(`\\s+`)\nvar comments = regexp.MustCompile(\"(?m)^-(.*)$\")\n\nfunc normalizeDump(in string) string {\n\tin = comments.ReplaceAllString(in, \"\")\n\tspaces.ReplaceAllString(in, \" \")\n\n\treturn in\n}\n\nfunc retryOpen(c *pop.Connection) (err error) {\n\tfor i := 0; i <= 60; i++ {\n\t\ttime.Sleep(time.Second)\n\n\t\terr = c.Open()\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\n\t\terr = c.RawQuery(\"SELECT 1\").Exec()\n\t\tif err == nil {\n\t\t\treturn nil\n\t\t}\n\t}\n\treturn err\n}\n\nfunc runTestData(s *suite.Suite, c *pop.Connection, supportsUUID bool) func() {\n\treturn func() {\n\t\tr := s.Require()\n\n\t\tif supportsUUID {\n\t\t\tr.Error(c.RawQuery(\"INSERT INTO e2e_authors (id, created_at, updated_at) VALUES (?, ?, ?)\", \"78dba9f7-dd20a39f64cb\", time.Now(), time.Now()).Exec(), \"should fail because uuid format is not correct\")\n\t\t}\n\n\t\trunInsertUUID(c, r)\n\t\trunForeignKeyChecks(c, r)\n\t\trunUniqueKeyChecks(c, r)\n\t\trunNotNullChecks(c, r)\n\t}\n}\n\nfunc runInsertUUID(c *pop.Connection, r *require.Assertions) {\n\tr.NoError(c.RawQuery(\"INSERT INTO e2e_authors (id, created_at, updated_at) VALUES (?, ?, ?)\", \"78dba9f7-81af-415e-aa2b-dd20a39f64cb\", time.Now(), time.Now()).Exec())\n\tr.Error(c.RawQuery(\"INSERT INTO e2e_authors (id, created_at, updated_at) VALUES (?, ?, ?)\", \"78dba9f7-81af-415e-aa2b-dd20a39f64cb\", time.Now(), time.Now()).Exec(), \"should fail because it is a duplicate primary key\")\n}\n\nfunc runForeignKeyChecks(c *pop.Connection, r *require.Assertions) {\n\terr := c.RawQuery(\"INSERT INTO e2e_user_posts (id, author_id, slug, published) VALUES (?,?,?, false)\", \"acd6abe3-38fa-4c3c-a676-933e1b06fa42\", \"cc1debdc-5d5a-41f3-a36b-48b1f3a03089\", \"slug-1\").Exec()\n\tr.Error(err, \"should fail because foreign key constraint fails\")\n\tr.Contains(strings.ToLower(err.Error()), \"foreign\")\n\n\tr.NoError(c.RawQuery(\"INSERT INTO e2e_user_posts (id, author_id, slug, published) VALUES (?,?,?, false)\", \"03c6c800-54c6-40cd-89f1-7dff731f9b54\", \"78dba9f7-81af-415e-aa2b-dd20a39f64cb\", \"slug-1\").Exec())\n\n\tr.NoError(c.RawQuery(\"INSERT INTO e2e_address (id) VALUES (?)\", \"d8b79b1d-e510-4763-92b3-828244b54893\").Exec())\n\tr.NoError(c.RawQuery(\"INSERT INTO e2e_flow (id) VALUES (?)\", \"96a8b5f8-6b1b-4936-9b88-397cf0886235\").Exec())\n\tr.NoError(c.RawQuery(\"INSERT INTO e2e_token (id, token, e2e_flow_id, e2e_address_id) VALUES (?, ?, ?, ?)\", \"5ba7f9c5-c469-439a-a07c-859f7b7b3448\", \"1539b471f990\", \"96a8b5f8-6b1b-4936-9b88-397cf0886235\", \"d8b79b1d-e510-4763-92b3-828244b54893\").Exec())\n}\n\nfunc runUniqueKeyChecks(c *pop.Connection, r *require.Assertions) {\n\tr.NoError(c.RawQuery(\"INSERT INTO e2e_user_posts (id, author_id, slug) VALUES (?,?,?)\", \"ccbf7278-092d-4c6f-a627-84cf45233c6a\", \"78dba9f7-81af-415e-aa2b-dd20a39f64cb\", \"dupe-slug\").Exec())\n\n\terr := c.RawQuery(\"INSERT INTO e2e_user_posts (id, author_id, slug) VALUES (?,?,?)\", \"ff7eb268-1640-48d3-b295-57d9a20faf3f\", \"78dba9f7-81af-415e-aa2b-dd20a39f64cb\", \"dupe-slug\").Exec()\n\tr.Error(err, \"should fail because UNIQUE constraint fails\")\n\n\tmessage := strings.ToLower(err.Error())\n\tr.True(\n\t\tstrings.Contains(message, \"duplicate\") ||\n\t\t\tstrings.Contains(message, \"unique\"))\n}\n\nfunc runNotNullChecks(c *pop.Connection, r *require.Assertions) {\n\terr := c.RawQuery(\"INSERT INTO e2e_user_posts (id, author_id) VALUES (?,?)\", \"a23e6e72-08f9-412f-afb8-01f6af234eb9\", \"78dba9f7-81af-415e-aa2b-dd20a39f64cb\").Exec()\n\tr.Error(err, \"should fail because NOT NULL fails\")\n\tmessage := strings.ToLower(err.Error())\n\tr.True(\n\t\tstrings.Contains(message, \"null\") ||\n\t\t\tstrings.Contains(message, \"default\"))\n}\n"
  },
  {
    "path": "testdata/e2e/mysql_test.go",
    "content": "package e2e_test\n\nimport (\n\t\"github.com/gobuffalo/pop/v6\"\n\t\"github.com/stretchr/testify/suite\"\n)\n\ntype MySQLSuite struct {\n\tsuite.Suite\n}\n\nfunc (s *MySQLSuite) Test_MySQL_MigrationSteps() {\n\tr := s.Require()\n\n\tc, err := pop.Connect(\"mysql\")\n\tr.NoError(err)\n\tr.NoError(retryOpen(c))\n\n\trun(&s.Suite, c, runTestData(&s.Suite, c, false))\n}\n"
  },
  {
    "path": "testdata/e2e/postgres_test.go",
    "content": "package e2e_test\n\nimport (\n\t\"github.com/gobuffalo/pop/v6\"\n\t\"github.com/stretchr/testify/suite\"\n)\n\ntype PostgreSQLSuite struct {\n\tsuite.Suite\n}\n\nfunc (s *PostgreSQLSuite) Test_PostgreSQL_MigrationSteps() {\n\tr := s.Require()\n\n\tc, err := pop.Connect(\"postgres\")\n\tr.NoError(err)\n\tr.NoError(retryOpen(c))\n\n\trun(&s.Suite, c, runTestData(&s.Suite, c, true))\n}\n"
  },
  {
    "path": "testdata/e2e/sqlite3_test.go",
    "content": "package e2e_test\n\nimport (\n\t\"io/ioutil\"\n\n\t\"github.com/gobuffalo/pop/v6\"\n\t\"github.com/stretchr/testify/suite\"\n)\n\ntype SQLiteSuite struct {\n\tsuite.Suite\n}\n\nfunc (s *SQLiteSuite) Test_SQLite_MigrationSteps() {\n\tr := s.Require()\n\n\ttd, err := ioutil.TempDir(\"\", \"pop-e2e-sqlite\")\n\tr.NoError(err)\n\n\tc, err := pop.NewConnection(&pop.ConnectionDetails{URL: \"sqlite3://\" + td + \"db.sql?mode=rwc&_fk=true\"})\n\tr.NoError(err)\n\tr.NoError(c.Open(), \"%s\", c.URL())\n\tr.NoError(c.RawQuery(\"SELECT 1\").Exec(), \"%s\", c.URL())\n\n\trun(&s.Suite, c, runTestData(&s.Suite, c, false))\n}\n"
  },
  {
    "path": "testdata/migrations/.gitignore",
    "content": "schema.sql"
  },
  {
    "path": "testdata/migrations/20160808213308_setup_tests.down.fizz",
    "content": "drop_table(\"users\")\ndrop_table(\"good_friends\")\ndrop_table(\"validatable_cars\")\ndrop_table(\"not_validatable_cars\")\ndrop_table(\"callbacks_users\")\ndrop_table(\"books\")\ndrop_table(\"cars\")"
  },
  {
    "path": "testdata/migrations/20160808213308_setup_tests.up.fizz",
    "content": "create_table(\"users\") {\n  t.Column(\"name\", \"string\")\n  t.Column(\"alive\", \"boolean\", {null: true})\n  t.Column(\"birth_date\", \"timestamp\", {null: true})\n  t.Column(\"bio\", \"text\", {null: true})\n  t.Column(\"price\", \"numeric\", {null: true, default: \"1.00\"})\n  t.Column(\"email\", \"string\", {default: \"foo@example.com\", size: 50})\n}\n\ncreate_table(\"good_friends\") {\n  t.Column(\"first_name\", \"string\")\n  t.Column(\"last_name\", \"string\")\n  t.DisableTimestamps()\n}\n\ncreate_table(\"validatable_cars\") {\n  t.Column(\"name\", \"string\")\n}\n\ncreate_table(\"not_validatable_cars\") {\n  t.Column(\"name\", \"string\")\n}\n\ncreate_table(\"callbacks_users\") {\n  t.Column(\"before_s\", \"string\")\n  t.Column(\"before_c\", \"string\")\n  t.Column(\"before_u\", \"string\")\n  t.Column(\"before_d\", \"string\")\n  t.Column(\"after_s\", \"string\")\n  t.Column(\"after_c\", \"string\")\n  t.Column(\"after_u\", \"string\")\n  t.Column(\"after_d\", \"string\")\n  t.Column(\"after_f\", \"string\")\n}\n\ncreate_table(\"books\") {\n  t.Column(\"title\", \"string\")\n  t.Column(\"user_id\", \"int\", {null: true})\n  t.Column(\"isbn\", \"string\", {size: 50})\n}\n\ncreate_table(\"taxis\") {\n  t.Column(\"model\", \"string\")\n  t.Column(\"user_id\", \"int\", {null: true})\n}\n"
  },
  {
    "path": "testdata/migrations/20160808213310_setup_tests2.down.fizz",
    "content": "drop_table(\"songs\")\ndrop_table(\"course_codes\")\ndrop_table(\"courses\")\n{{ if eq .Dialect \"postgres\" }}\ndrop_table(\"cakes\")\n{{ end }}\n"
  },
  {
    "path": "testdata/migrations/20160808213310_setup_tests2.up.fizz",
    "content": "create_table(\"songs\") {\n  t.Column(\"id\", \"uuid\", {primary: true})\n  t.Column(\"u_id\", \"int\", {null: true})\n  t.Column(\"title\", \"string\")\n  t.Column(\"composed_by_id\", \"int\", {null: true})\n}\n\ncreate_table(\"composers\") {\n  t.Column(\"name\", \"string\")\n}\n\ncreate_table(\"writers\") {\n  t.Column(\"name\", \"string\")\n  t.Column(\"book_id\", \"int\")\n}\n\ncreate_table(\"addresses\") {\n  t.Column(\"street\", \"string\")\n  t.Column(\"house_number\", \"int\")\n}\n\ncreate_table(\"users_addresses\") {\n  t.Column(\"user_id\", \"int\")\n  t.Column(\"address_id\", \"int\")\n}\n\ncreate_table(\"courses\") {\n  t.Column(\"id\", \"uuid\", {primary: true})\n}\n\ncreate_table(\"course_codes\") {\n  t.Column(\"id\", \"uuid\", {primary: true})\n  t.Column(\"course_id\", \"uuid\")\n}\n\nif (dialect == \"postgres\") {\n  create_table(\"cakes\") {\n    t.Column(\"int_slice\", \"int[]\", {null: true})\n    t.Column(\"float_slice\", \"numeric[]\", {null: true})\n    t.Column(\"string_slice\", \"varchar[]\", {null: true})\n  }\n}\n\nadd_column(\"books\", \"description\", \"string\", {default: \"\"})\nchange_column(\"books\", \"description\", \"string\", {default: \"test\", \"size\": 100})\nadd_index(\"books\",\"description\")\nrename_index(\"books\",\"books_description_idx\",\"books_description_index\")\n"
  },
  {
    "path": "testdata/migrations/multiple/20180413210602_create_users.mysql.up.sql",
    "content": ""
  },
  {
    "path": "testdata/migrations/multiple/20180413210602_create_users.postgres.up.sql",
    "content": ""
  },
  {
    "path": "testdata/migrations/multiple/20180413210602_create_users.sqlite3.up.sql",
    "content": ""
  },
  {
    "path": "testdata/migrations/multiple/20180413210602_create_users.up.sql",
    "content": ""
  },
  {
    "path": "translator.go",
    "content": "package fizz\n\n// Translator describes the common interface to define a fizz\n// to SQL translator.\ntype Translator interface {\n\tCreateTable(Table) (string, error)\n\tDropTable(Table) (string, error)\n\tRenameTable([]Table) (string, error)\n\tAddColumn(Table) (string, error)\n\tChangeColumn(Table) (string, error)\n\tDropColumn(Table) (string, error)\n\tRenameColumn(Table) (string, error)\n\tAddIndex(Table) (string, error)\n\tDropIndex(Table) (string, error)\n\tRenameIndex(Table) (string, error)\n\tAddForeignKey(Table) (string, error)\n\tDropForeignKey(Table) (string, error)\n}\n"
  },
  {
    "path": "translators/cockroach.go",
    "content": "package translators\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/gobuffalo/fizz\"\n)\n\ntype Cockroach struct {\n\tSchema SchemaQuery\n}\n\nfunc NewCockroach(url string, name string) *Cockroach {\n\tschema := &cockroachSchema{\n\t\tSchema{\n\t\t\tURL:    url,\n\t\t\tName:   name,\n\t\t\tschema: map[string]*fizz.Table{},\n\t\t},\n\t}\n\tschema.Builder = schema\n\treturn &Cockroach{Schema: schema}\n}\n\nfunc (Cockroach) Name() string {\n\treturn \"cockroach\"\n}\n\nfunc (p *Cockroach) CreateTable(t fizz.Table) (string, error) {\n\tp.Schema.SetTable(&t)\n\tsql := []string{}\n\tcols := []string{}\n\tvar s string\n\tfor _, c := range t.Columns {\n\t\tif c.Primary {\n\t\t\tswitch c.ColType {\n\t\t\tcase \"string\", \"uuid\":\n\t\t\tcase \"integer\", \"INT\", \"int\":\n\t\t\t\tc.ColType = \"SERIAL\"\n\t\t\tdefault:\n\t\t\t\treturn \"\", fmt.Errorf(\"can not use %s as a primary key\", c.ColType)\n\t\t\t}\n\t\t}\n\t\tcols = append(cols, p.buildAddColumn(c))\n\t\tif c.Primary {\n\t\t\tcols = append(cols, fmt.Sprintf(`PRIMARY KEY(\"%s\")`, c.Name))\n\t\t}\n\t}\n\n\tfor _, fk := range t.ForeignKeys {\n\t\tcols = append(cols, p.buildForeignKey(t, fk, true))\n\t}\n\n\tprimaryKeys := t.PrimaryKeys()\n\tif len(primaryKeys) > 1 {\n\t\tpks := make([]string, len(primaryKeys))\n\t\tfor i, pk := range primaryKeys {\n\t\t\tpks[i] = fmt.Sprintf(\"\\\"%s\\\"\", pk)\n\t\t}\n\t\tcols = append(cols, fmt.Sprintf(\"PRIMARY KEY(%s)\", strings.Join(pks, \", \")))\n\t}\n\n\ts = fmt.Sprintf(\"CREATE TABLE \\\"%s\\\" (\\n%s\\n);COMMIT TRANSACTION;BEGIN TRANSACTION;\", t.Name, strings.Join(cols, \",\\n\"))\n\tsql = append(sql, s)\n\n\tfor _, i := range t.Indexes {\n\t\ts, err := p.AddIndex(fizz.Table{\n\t\t\tName:    t.Name,\n\t\t\tIndexes: []fizz.Index{i},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tsql = append(sql, s)\n\t}\n\n\treturn strings.Join(sql, \"\\n\"), nil\n}\n\nfunc (p *Cockroach) DropTable(t fizz.Table) (string, error) {\n\tp.Schema.Delete(t.Name)\n\treturn fmt.Sprintf(\"DROP TABLE \\\"%s\\\";COMMIT TRANSACTION;BEGIN TRANSACTION;\", t.Name), nil\n}\n\nfunc (p *Cockroach) RenameTable(t []fizz.Table) (string, error) {\n\tif len(t) < 2 {\n\t\treturn \"\", fmt.Errorf(\"not enough table names supplied\")\n\t}\n\toldName := t[0].Name\n\tnewName := t[1].Name\n\ttableInfo, err := p.Schema.TableInfo(oldName)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\ttableInfo.Name = newName\n\n\treturn fmt.Sprintf(\"ALTER TABLE \\\"%s\\\" RENAME TO \\\"%s\\\";COMMIT TRANSACTION;BEGIN TRANSACTION;\", oldName, newName), nil\n}\n\nfunc (p *Cockroach) ChangeColumn(t fizz.Table) (string, error) {\n\tif len(t.Columns) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough columns supplied\")\n\t}\n\tc := t.Columns[0]\n\n\ttableInfo, err := p.Schema.TableInfo(t.Name)\n\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tfor i := range tableInfo.Columns {\n\t\tif tableInfo.Columns[i].Name == t.Columns[0].Name {\n\t\t\ttableInfo.Columns[i] = c\n\t\t\tbreak\n\t\t}\n\t}\n\n\tsql := []string{}\n\ts, err := p.withTempColumn(t.Name, c.Name, func(table fizz.Table, origCol fizz.Column, tempCol string) (string, error) {\n\t\tvar notNullWorkaround bool\n\t\tif c.Options[\"default_raw\"] == nil && c.Options[\"default\"] == nil && c.Options[\"null\"] == nil {\n\t\t\t// This happens when the original column has \"NOT NULL\" and the changed column also has \"NOT NULL\" and no \"DEFAULT\".\n\t\t\t// In those cases, if the table has data already, CockroachDB will fail with an error mandating that a column can not\n\t\t\t// be added to the table unless it is either \"NULL\" or has a \"DEFAULT\". By first using NULL and then setting the\n\t\t\t// \"NOT NULL\" constraint, this problem is worked around.\n\t\t\tnotNullWorkaround = true\n\t\t}\n\n\t\tnewCol := p.buildChangeColumn(origCol, c)\n\t\terr1 := p.Schema.ReplaceColumn(table.Name, origCol.Name, newCol)\n\t\tif err1 != nil {\n\t\t\treturn \"\", err1\n\t\t}\n\n\t\tif notNullWorkaround {\n\t\t\tnewCol.Options[\"null\"] = true\n\t\t}\n\n\t\tcreateColumnSQL := fmt.Sprintf(`ALTER TABLE \"%s\" ADD COLUMN %s;COMMIT TRANSACTION;BEGIN TRANSACTION;`, table.Name, p.buildAddColumn(newCol))\n\t\tins := fmt.Sprintf(`UPDATE \"%s\" SET \"%s\" = \"%s\";COMMIT TRANSACTION;BEGIN TRANSACTION;`, t.Name, c.Name, tempCol)\n\n\t\tsql := []string{createColumnSQL, ins}\n\t\tif notNullWorkaround {\n\t\t\tnewCol.Options[\"null\"] = nil\n\t\t\tsql = append(sql, fmt.Sprintf(`ALTER TABLE \"%s\" ALTER COLUMN \"%s\" SET NOT NULL;COMMIT TRANSACTION;BEGIN TRANSACTION;`, t.Name, newCol.Name))\n\t\t}\n\n\t\treturn strings.Join(sql, \"\\n\"), nil\n\t})\n\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tsql = append(sql, s)\n\n\treturn strings.Join(sql, \"\\n\"), nil\n}\n\nfunc (p *Cockroach) AddColumn(t fizz.Table) (string, error) {\n\tif len(t.Columns) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough columns supplied\")\n\t}\n\tc := t.Columns[0]\n\ts := fmt.Sprintf(\"ALTER TABLE \\\"%s\\\" ADD COLUMN %s;COMMIT TRANSACTION;BEGIN TRANSACTION;\", t.Name, p.buildAddColumn(c))\n\n\t// Update schema cache if we can\n\ttableInfo, err := p.Schema.TableInfo(t.Name)\n\tif err == nil {\n\t\tfound := false\n\t\tfor i := range tableInfo.Columns {\n\t\t\tif tableInfo.Columns[i].Name == c.Name {\n\t\t\t\ttableInfo.Columns[i] = c\n\t\t\t\tfound = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif !found {\n\t\t\ttableInfo.Columns = append(tableInfo.Columns, c)\n\t\t}\n\t}\n\n\treturn s, nil\n}\n\nfunc (p *Cockroach) DropColumn(t fizz.Table) (string, error) {\n\tif len(t.Columns) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough columns supplied\")\n\t}\n\tc := t.Columns[0]\n\tp.Schema.DeleteColumn(t.Name, c.Name)\n\treturn fmt.Sprintf(\"ALTER TABLE \\\"%s\\\" DROP COLUMN \\\"%s\\\";COMMIT TRANSACTION;BEGIN TRANSACTION;\", t.Name, c.Name), nil\n}\n\nfunc (p *Cockroach) RenameColumn(t fizz.Table) (string, error) {\n\tif len(t.Columns) < 2 {\n\t\treturn \"\", fmt.Errorf(\"not enough columns supplied\")\n\t}\n\n\toc := t.Columns[0]\n\tnc := t.Columns[1]\n\n\ttableInfo, err := p.Schema.TableInfo(t.Name)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tfor ic, c := range tableInfo.Columns {\n\t\tif c.Name == oc.Name {\n\t\t\ttableInfo.Columns[ic].Name = nc.Name\n\t\t}\n\t}\n\n\ts := fmt.Sprintf(\"ALTER TABLE \\\"%s\\\" RENAME COLUMN \\\"%s\\\" TO \\\"%s\\\";COMMIT TRANSACTION;BEGIN TRANSACTION;\", t.Name, oc.Name, nc.Name)\n\treturn s, nil\n}\n\nfunc (p *Cockroach) AddIndex(t fizz.Table) (string, error) {\n\tif len(t.Indexes) == 0 {\n\t\treturn \"\", fmt.Errorf(\"Not enough indexes supplied\")\n\t}\n\ti := t.Indexes[0]\n\ts := fmt.Sprintf(\"CREATE INDEX \\\"%s\\\" ON \\\"%s\\\" (%s);COMMIT TRANSACTION;BEGIN TRANSACTION;\", i.Name, t.Name, strings.Join(i.Columns, \", \"))\n\tif i.Unique {\n\t\ts = strings.Replace(s, \"CREATE\", \"CREATE UNIQUE\", 1)\n\t}\n\n\ttableInfo, err := p.Schema.TableInfo(t.Name)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\ttableInfo.Indexes = append(tableInfo.Indexes, i)\n\n\treturn s, nil\n}\n\nfunc (p *Cockroach) DropIndex(t fizz.Table) (string, error) {\n\tif len(t.Indexes) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough indexes supplied\")\n\t}\n\ti := t.Indexes[0]\n\n\ttableInfo, err := p.Schema.TableInfo(t.Name)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tnewIndexes := []fizz.Index{}\n\tfor _, c := range tableInfo.Indexes {\n\t\tif c.Name != i.Name {\n\t\t\tnewIndexes = append(newIndexes, c)\n\t\t}\n\t}\n\ttableInfo.Indexes = newIndexes\n\n\treturn fmt.Sprintf(\"DROP INDEX IF EXISTS \\\"%s\\\";COMMIT TRANSACTION;BEGIN TRANSACTION;\", i.Name), nil\n}\n\nfunc (p *Cockroach) RenameIndex(t fizz.Table) (string, error) {\n\tix := t.Indexes\n\tif len(ix) < 2 {\n\t\treturn \"\", fmt.Errorf(\"not enough indexes supplied\")\n\t}\n\toi := ix[0]\n\tni := ix[1]\n\n\ttableInfo, err := p.Schema.TableInfo(t.Name)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tfor _, c := range tableInfo.Indexes {\n\t\tif c.Name == oi.Name {\n\t\t\tc.Name = ni.Name\n\t\t}\n\t}\n\n\treturn fmt.Sprintf(\"ALTER INDEX \\\"%s\\\"@\\\"%s\\\" RENAME TO \\\"%s\\\";COMMIT TRANSACTION;BEGIN TRANSACTION;\", t.Name, oi.Name, ni.Name), nil\n}\n\nfunc (p *Cockroach) AddForeignKey(t fizz.Table) (string, error) {\n\tif len(t.ForeignKeys) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough foreign keys supplied\")\n\t}\n\n\ttableInfo, err := p.Schema.TableInfo(t.Name)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\ttableInfo.ForeignKeys = append(tableInfo.ForeignKeys, t.ForeignKeys[0])\n\n\treturn p.buildForeignKey(t, t.ForeignKeys[0], false), nil\n}\n\nfunc (p *Cockroach) DropForeignKey(t fizz.Table) (string, error) {\n\tif len(t.ForeignKeys) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough foreign keys supplied\")\n\t}\n\n\tfk := t.ForeignKeys[0]\n\n\ttableInfo, err := p.Schema.TableInfo(t.Name)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tnewFKs := []fizz.ForeignKey{}\n\tfor _, key := range tableInfo.ForeignKeys {\n\t\tif key.Name != fk.Name {\n\t\t\tnewFKs = append(newFKs, key)\n\t\t}\n\t}\n\ttableInfo.ForeignKeys = newFKs\n\n\tvar ifExists string\n\tif v, ok := fk.Options[\"if_exists\"]; ok && v.(bool) {\n\t\tifExists = \"IF EXISTS \"\n\t}\n\n\ts := fmt.Sprintf(\"ALTER TABLE %s DROP CONSTRAINT %s\\\"%s\\\";COMMIT TRANSACTION;BEGIN TRANSACTION;\", p.escapeIdentifier(t.Name), ifExists, fk.Name)\n\treturn s, nil\n}\n\nfunc (p *Cockroach) buildAddColumn(c fizz.Column) string {\n\ts := fmt.Sprintf(\"\\\"%s\\\" %s\", c.Name, p.colType(c))\n\n\tif c.Options[\"null\"] == nil || c.Primary {\n\t\ts = fmt.Sprintf(\"%s NOT NULL\", s)\n\t}\n\tif c.Options[\"default\"] != nil {\n\t\ts = fmt.Sprintf(\"%s DEFAULT '%v'\", s, c.Options[\"default\"])\n\t}\n\tif c.Options[\"default_raw\"] != nil {\n\t\ts = fmt.Sprintf(\"%s DEFAULT %s\", s, c.Options[\"default_raw\"])\n\t}\n\n\treturn s\n}\n\nfunc (p *Cockroach) buildChangeColumn(oldCol fizz.Column, c fizz.Column) fizz.Column {\n\tnewCol := fizz.Column{\n\t\tName:    c.Name,\n\t\tColType: oldCol.ColType,\n\t\tOptions: oldCol.Options,\n\t\tPrimary: oldCol.Primary,\n\t}\n\n\tif c.Options[\"default\"] != nil {\n\t\tnewCol.Options[\"default\"] = c.Options[\"default\"]\n\t}\n\tif c.Options[\"null\"] != nil {\n\t\tnewCol.Options[\"null\"] = c.Options[\"null\"]\n\t}\n\tif c.Options[\"default_raw\"] != nil {\n\t\tnewCol.Options[\"default_raw\"] = c.Options[\"default_raw\"]\n\t}\n\n\treturn newCol\n}\n\nfunc (p *Cockroach) withTempTable(table string, fn func(fizz.Table) (string, error)) (string, error) {\n\ttempTable := fizz.Table{Name: fmt.Sprintf(\"_%s_tmp\", table)}\n\n\tsql := []string{fmt.Sprintf(\"ALTER TABLE \\\"%s\\\" RENAME TO \\\"%s\\\";COMMIT TRANSACTION;BEGIN TRANSACTION;\", table, tempTable.Name)}\n\ts, err := fn(tempTable)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tsql = append(sql, s, fmt.Sprintf(\"DROP TABLE \\\"%s\\\";COMMIT TRANSACTION;BEGIN TRANSACTION;\", tempTable.Name))\n\n\treturn strings.Join(sql, \"\\n\"), nil\n}\n\nfunc (p *Cockroach) withTempColumn(tableName string, column string, fn func(fizz.Table, fizz.Column, string) (string, error)) (string, error) {\n\ttable, err := p.Schema.TableInfo(tableName)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tcol, err1 := p.Schema.ColumnInfo(tableName, column)\n\tif err1 != nil {\n\t\treturn \"\", err1\n\t}\n\n\tvar sql []string\n\tvar recreateForeignKeys []fizz.ForeignKey\n\tfor _, i := range table.ForeignKeys {\n\t\tif i.Column == column {\n\t\t\ts, err := p.DropForeignKey(fizz.Table{\n\t\t\t\tName:        table.Name,\n\t\t\t\tForeignKeys: []fizz.ForeignKey{i},\n\t\t\t})\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", err\n\t\t\t}\n\t\t\tsql = append(sql, s)\n\t\t\trecreateForeignKeys = append(recreateForeignKeys, i)\n\t\t}\n\t}\n\n\tvar recreateIndexes []fizz.Index\n\tfor _, i := range table.Indexes {\n\t\tvar found bool\n\n\t\tfor _, ic := range i.Columns {\n\t\t\tif ic == column {\n\t\t\t\tfound = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\tif found {\n\t\t\ts, err := p.DropIndex(fizz.Table{\n\t\t\t\tName:    table.Name,\n\t\t\t\tIndexes: []fizz.Index{i},\n\t\t\t})\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", err\n\t\t\t}\n\t\t\tsql = append(sql, s)\n\t\t\trecreateIndexes = append(recreateIndexes, i)\n\t\t}\n\t}\n\n\ttempCol := fmt.Sprintf(\"_%s_tmp\", column)\n\n\tsql = append(sql, fmt.Sprintf(\"ALTER TABLE \\\"%s\\\" RENAME COLUMN \\\"%s\\\" TO \\\"%s\\\";COMMIT TRANSACTION;BEGIN TRANSACTION;\", tableName, column, tempCol))\n\n\ts, err := fn(*table, *col, tempCol)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tsql = append(sql, s, fmt.Sprintf(\"ALTER TABLE \\\"%s\\\" DROP COLUMN \\\"%s\\\";COMMIT TRANSACTION;BEGIN TRANSACTION;\", tableName, tempCol))\n\n\tfor _, i := range recreateIndexes {\n\t\ts, err := p.AddIndex(fizz.Table{\n\t\t\tName:    table.Name,\n\t\t\tIndexes: []fizz.Index{i},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tsql = append(sql, s)\n\t}\n\n\tfor _, i := range recreateForeignKeys {\n\t\ts, err := p.AddForeignKey(fizz.Table{\n\t\t\tName:        table.Name,\n\t\t\tForeignKeys: []fizz.ForeignKey{i},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tsql = append(sql, s)\n\t}\n\n\treturn strings.Join(sql, \"\\n\"), nil\n}\n\nfunc (p *Cockroach) colType(c fizz.Column) string {\n\tswitch c.ColType {\n\tcase \"string\":\n\t\ts := \"255\"\n\t\tif c.Options[\"size\"] != nil {\n\t\t\ts = fmt.Sprintf(\"%d\", c.Options[\"size\"])\n\t\t}\n\t\treturn fmt.Sprintf(\"VARCHAR (%s)\", s)\n\tcase \"uuid\":\n\t\treturn \"UUID\"\n\tcase \"time\", \"datetime\":\n\t\treturn \"timestamp\"\n\tcase \"blob\":\n\t\treturn \"BYTES\"\n\tcase \"float\", \"decimal\":\n\t\tif c.Options[\"precision\"] != nil {\n\t\t\tprecision := c.Options[\"precision\"]\n\t\t\tif c.Options[\"scale\"] != nil {\n\t\t\t\tscale := c.Options[\"scale\"]\n\t\t\t\treturn fmt.Sprintf(\"DECIMAL(%d,%d)\", precision, scale)\n\t\t\t}\n\t\t\treturn fmt.Sprintf(\"DECIMAL(%d)\", precision)\n\t\t}\n\n\t\treturn \"DECIMAL\"\n\tdefault:\n\t\treturn c.ColType\n\t}\n}\n\nfunc (p *Cockroach) buildForeignKey(t fizz.Table, fk fizz.ForeignKey, onCreate bool) string {\n\trcols := []string{}\n\tfor _, c := range fk.References.Columns {\n\t\trcols = append(rcols, fmt.Sprintf(\"\\\"%s\\\"\", c))\n\t}\n\trefs := fmt.Sprintf(\"%s (%s)\", p.escapeIdentifier(fk.References.Table), strings.Join(rcols, \", \"))\n\ts := fmt.Sprintf(\"CONSTRAINT \\\"%s\\\" FOREIGN KEY (\\\"%s\\\") REFERENCES %s\", fk.Name, fk.Column, refs)\n\n\tif onUpdate, ok := fk.Options[\"on_update\"]; ok {\n\t\ts += fmt.Sprintf(\" ON UPDATE %s\", onUpdate)\n\t}\n\n\tif onDelete, ok := fk.Options[\"on_delete\"]; ok {\n\t\ts += fmt.Sprintf(\" ON DELETE %s\", onDelete)\n\t}\n\n\tif !onCreate {\n\t\ts = fmt.Sprintf(\"ALTER TABLE %s ADD %s;COMMIT TRANSACTION;BEGIN TRANSACTION;\", p.escapeIdentifier(t.Name), s)\n\t}\n\n\treturn s\n}\n\nfunc (Cockroach) escapeIdentifier(s string) string {\n\tif !strings.ContainsRune(s, '.') {\n\t\treturn fmt.Sprintf(\"\\\"%s\\\"\", s)\n\t}\n\tparts := strings.Split(s, \".\")\n\tfor _, p := range parts {\n\t\tp = fmt.Sprintf(\"\\\"%s\\\"\", p)\n\t}\n\treturn strings.Join(parts, \".\")\n}\n"
  },
  {
    "path": "translators/cockroach_meta.go",
    "content": "package translators\n\nimport (\n\t\"database/sql\"\n\t\"fmt\"\n\n\t\"github.com/gobuffalo/fizz\"\n)\n\ntype cockroachForeignKeyListInfo struct {\n\tName      string `db:\"name\"`\n\tColumn    string `db:\"column_name\"`\n\tTableRef  string `db:\"referenced_table_name\"`\n\tColumnRef string `db:\"referenced_column_name\"`\n\tOnUpdate  string `db:\"on_update\"`\n\tOnDelete  string `db:\"on_delete\"`\n\tMatch     string `db:\"match\"`\n}\n\ntype cockroachIndexListInfo struct {\n\tName      string `db:\"name\"`\n\tNonUnique bool   `db:\"non_unique\"`\n}\n\ntype cockroachIndexInfo struct {\n\tName      string `db:\"name\"`\n\tDirection string `db:\"direction\"`\n}\n\ntype cockroachTableInfo struct {\n\tName    string      `db:\"column_name\"`\n\tType    string      `db:\"data_type\"`\n\tNotNull bool        `db:\"not_null\"`\n\tDefault interface{} `db:\"column_default\"`\n\tPK      bool        `db:\"pk\"`\n}\n\nfunc (t cockroachTableInfo) ToColumn() fizz.Column {\n\tc := fizz.Column{\n\t\tName:    t.Name,\n\t\tColType: t.Type,\n\t\tPrimary: t.PK,\n\t\tOptions: fizz.Options{},\n\t}\n\tif !t.NotNull {\n\t\tc.Options[\"null\"] = true\n\t}\n\tif t.Default != nil {\n\t\tc.Options[\"default_raw\"] = fmt.Sprint(t.Default) // strings.TrimSuffix(strings.TrimPrefix(fmt.Sprintf(\"%s\", t.Default), \"'\"), \"'\")\n\t}\n\treturn c\n}\n\ntype cockroachSchema struct {\n\tSchema\n}\n\nfunc (p *cockroachSchema) Build() error {\n\tvar err error\n\tdb, err := sql.Open(\"pgx\", p.URL)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer db.Close()\n\n\tres, err := db.Query(\"SELECT table_name as name FROM information_schema.tables;\")\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor res.Next() {\n\t\ttable := &fizz.Table{\n\t\t\tColumns: []fizz.Column{},\n\t\t\tIndexes: []fizz.Index{},\n\t\t}\n\t\terr = res.Scan(&table.Name)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif table.Name != \"cockroach_sequence\" {\n\t\t\terr = p.buildTableData(table, db)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t}\n\treturn nil\n}\n\nfunc (p *cockroachSchema) buildTableData(table *fizz.Table, db *sql.DB) error {\n\tprag := fmt.Sprintf(`SELECT c.column_name, \n\tc.data_type, \n\t(c.is_nullable = 'NO') as \"not_null\",\n\tc.column_default,\n\t(tc.table_schema IS NOT NULL)::bool AS \"pk\"\n\tFROM information_schema.columns AS c\n\tLEFT JOIN information_schema.key_column_usage as kcu\n\t\tON ((c.table_schema = kcu.table_schema)\n\t\tAND (c.table_name = kcu.table_name)\n\t\tAND (c.column_name = kcu.column_name))\n\tLEFT JOIN information_schema.table_constraints AS tc\n\t\tON ((tc.table_schema = kcu.table_schema)\n\t\tAND (tc.table_name = kcu.table_name)\n\t\tAND (tc.constraint_name = kcu.constraint_name))\n\t\tAND (tc.constraint_name = 'primary')\n\tWHERE c.table_name = '%s';`, table.Name)\n\n\tres, err := db.Query(prag)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer res.Close()\n\n\tfor res.Next() {\n\t\tti := cockroachTableInfo{}\n\t\terr = res.Scan(&ti.Name, &ti.Type, &ti.NotNull, &ti.Default, &ti.PK)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttable.Columns = append(table.Columns, ti.ToColumn())\n\t}\n\terr = p.buildTableIndexes(table, db)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = p.buildForeignKeyIndexes(table, db)\n\tif err != nil {\n\t\treturn err\n\t}\n\tp.schema[table.Name] = table\n\treturn nil\n}\n\nfunc (p *cockroachSchema) buildTableIndexes(t *fizz.Table, db *sql.DB) error {\n\tprag := fmt.Sprintf(`\nSELECT\n    DISTINCT index_name AS name,\n                     (non_unique = 'YES') AS non_unique\nFROM\n     information_schema.statistics\nWHERE\n      table_name = '%s';\n`, t.Name)\n\tres, err := db.Query(prag)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer res.Close()\n\n\tfor res.Next() {\n\t\tli := cockroachIndexListInfo{}\n\t\terr = res.Scan(&li.Name, &li.NonUnique)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\ti := fizz.Index{\n\t\t\tName:    li.Name,\n\t\t\tUnique:  !li.NonUnique,\n\t\t\tColumns: []string{},\n\t\t}\n\n\t\tprag = fmt.Sprintf(\"SELECT column_name as name, direction FROM information_schema.statistics where index_name = '%s' and implicit = 'NO';\", i.Name)\n\t\tiires, err := db.Query(prag)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tfor iires.Next() {\n\t\t\tii := cockroachIndexInfo{}\n\t\t\terr = iires.Scan(&ii.Name, &ii.Direction)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\ti.Columns = append(i.Columns, ii.Name)\n\t\t}\n\n\t\tt.Indexes = append(t.Indexes, i)\n\t}\n\treturn nil\n}\n\nfunc (p *cockroachSchema) buildForeignKeyIndexes(t *fizz.Table, db *sql.DB) error {\n\tprag := fmt.Sprintf(`\nSELECT\n\tfk.constraint_name,\n\tfk.referenced_table_name,\n\tcol.column_name,\n\tfk.update_rule,\n\tfk.delete_rule,\n\tfk.match_option\nFROM\n\tinformation_schema.referential_constraints as fk\nINNER JOIN\n\tinformation_schema.key_column_usage as col\nON\n\tcol.constraint_name = fk.constraint_name\nWHERE\n\tfk.table_name = '%s'\n;`, t.Name)\n\tres, err := db.Query(prag)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer res.Close()\n\n\tfor res.Next() {\n\t\tli := cockroachForeignKeyListInfo{}\n\t\terr = res.Scan(\n\t\t\t&li.Name,\n\t\t\t&li.TableRef,\n\t\t\t&li.Column,\n\t\t\t&li.OnUpdate,\n\t\t\t&li.OnDelete,\n\t\t\t&li.Match)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\toptions := map[string]interface{}{}\n\t\tif li.OnDelete != \"\" {\n\t\t\toptions[\"on_delete\"] = li.OnDelete\n\t\t}\n\n\t\tif li.OnUpdate != \"\" {\n\t\t\toptions[\"on_update\"] = li.OnUpdate\n\t\t}\n\n\t\tif li.Match != \"\" {\n\t\t\toptions[\"match\"] = li.Match\n\t\t}\n\n\t\tref := fizz.ForeignKeyRef{\n\t\t\tTable:   li.TableRef,\n\t\t\tColumns: []string{},\n\t\t}\n\n\t\tprag = fmt.Sprintf(`\nSELECT\n\tcolumn_name as referenced_column_name\nFROM\n\tinformation_schema.constraint_column_usage as ref\nWHERE \n\tconstraint_name = '%s'\n;`, li.Name)\n\t\tiires, err := db.Query(prag)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tfor iires.Next() {\n\t\t\tii := cockroachForeignKeyListInfo{}\n\t\t\terr = iires.Scan(&ii.ColumnRef)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tref.Columns = append(ref.Columns, ii.ColumnRef)\n\t\t}\n\n\t\ti := fizz.ForeignKey{\n\t\t\tName:       li.Name,\n\t\t\tColumn:     li.Column,\n\t\t\tReferences: ref,\n\t\t\tOptions:    options,\n\t\t}\n\n\t\tt.ForeignKeys = append(t.ForeignKeys, i)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "translators/cockroach_test.go",
    "content": "package translators_test\n\nimport (\n\t\"github.com/gobuffalo/fizz\"\n\t\"github.com/gobuffalo/fizz/translators\"\n)\n\nvar _ fizz.Translator = (*translators.Cockroach)(nil)\n\nfunc (p *CockroachSuite) crdbt() *translators.Cockroach {\n\tret := translators.NewCockroach(\"\", \"pop_test\")\n\tschema := map[string]*fizz.Table{}\n\tta := &fizz.Table{Name: \"users\"}\n\tta.Column(\"testColumn\", \"type\", nil)\n\tta.Indexes = append(ta.Indexes, fizz.Index{Name: \"testIndex\"})\n\tschema[\"users\"] = ta\n\tta = &fizz.Table{Name: \"table_name\"}\n\tta.Column(\"old_column\", \"type\", nil)\n\tschema[\"table_name\"] = ta\n\tta = &fizz.Table{Name: \"mytable\"}\n\tta.Column(\"mycolumn\", \"type\", nil)\n\tschema[\"mytable\"] = ta\n\tta = &fizz.Table{Name: \"table\"}\n\tta.Indexes = []fizz.Index{{Name: \"old_ix\"}}\n\tschema[\"table\"] = ta\n\tta = &fizz.Table{Name: \"profiles\"}\n\tschema[\"profiles\"] = ta\n\n\tret.Schema.ReplaceSchema(schema)\n\treturn ret\n}\n\nfunc (p *CockroachSuite) Test_Cockroach_CreateTable() {\n\tr := p.Require()\n\tddl := `CREATE TABLE \"users\" (\n\"id\" SERIAL NOT NULL,\nPRIMARY KEY(\"id\"),\n\"first_name\" VARCHAR (255) NOT NULL,\n\"last_name\" VARCHAR (255) NOT NULL,\n\"email\" VARCHAR (20) NOT NULL,\n\"permissions\" jsonb,\n\"age\" integer DEFAULT '40',\n\"raw\" BYTES NOT NULL,\n\"float\" DECIMAL(5) NOT NULL,\n\"company_id\" UUID NOT NULL DEFAULT uuid_generate_v1(),\n\"created_at\" timestamp NOT NULL,\n\"updated_at\" timestamp NOT NULL\n);COMMIT TRANSACTION;BEGIN TRANSACTION;`\n\n\tres, _ := fizz.AString(`\n\tcreate_table(\"users\") {\n\t\tt.Column(\"id\", \"integer\", {\"primary\": true})\n\t\tt.Column(\"first_name\", \"string\", {})\n\t\tt.Column(\"last_name\", \"string\", {})\n\t\tt.Column(\"email\", \"string\", {\"size\":20})\n\t\tt.Column(\"permissions\", \"jsonb\", {\"null\": true})\n\t\tt.Column(\"age\", \"integer\", {\"null\": true, \"default\": 40})\n\t\tt.Column(\"raw\", \"blob\", {})\n\t\tt.Column(\"float\", \"float\", {\"precision\": 5})\n\t\tt.Column(\"company_id\", \"uuid\", {\"default_raw\": \"uuid_generate_v1()\"})\n\t}\n\t`, p.crdbt())\n\tr.Equal(ddl, res)\n}\n\nfunc (p *CockroachSuite) Test_Cockroach_CreateTable_UUID() {\n\tr := p.Require()\n\tddl := `CREATE TABLE \"users\" (\n\"first_name\" VARCHAR (255) NOT NULL,\n\"last_name\" VARCHAR (255) NOT NULL,\n\"email\" VARCHAR (20) NOT NULL,\n\"permissions\" jsonb,\n\"age\" integer DEFAULT '40',\n\"uuid\" UUID NOT NULL,\nPRIMARY KEY(\"uuid\"),\n\"created_at\" timestamp NOT NULL,\n\"updated_at\" timestamp NOT NULL\n);COMMIT TRANSACTION;BEGIN TRANSACTION;`\n\n\tres, _ := fizz.AString(`\n\tcreate_table(\"users\") {\n\t\tt.Column(\"first_name\", \"string\", {})\n\t\tt.Column(\"last_name\", \"string\", {})\n\t\tt.Column(\"email\", \"string\", {\"size\":20})\n\t\tt.Column(\"permissions\", \"jsonb\", {\"null\": true})\n\t\tt.Column(\"age\", \"integer\", {\"null\": true, \"default\": 40})\n\t\tt.Column(\"uuid\", \"uuid\", {\"primary\": true})\n\t}\n\t`, p.crdbt())\n\tr.Equal(ddl, res)\n}\n\nfunc (p *CockroachSuite) Test_Cockroach_CreateTables_WithForeignKeys() {\n\tr := p.Require()\n\tddl := `CREATE TABLE \"users\" (\n\"id\" SERIAL NOT NULL,\nPRIMARY KEY(\"id\"),\n\"email\" VARCHAR (20) NOT NULL,\n\"created_at\" timestamp NOT NULL,\n\"updated_at\" timestamp NOT NULL\n);COMMIT TRANSACTION;BEGIN TRANSACTION;\nCREATE TABLE \"profiles\" (\n\"id\" SERIAL NOT NULL,\nPRIMARY KEY(\"id\"),\n\"user_id\" INT NOT NULL,\n\"first_name\" VARCHAR (255) NOT NULL,\n\"last_name\" VARCHAR (255) NOT NULL,\n\"created_at\" timestamp NOT NULL,\n\"updated_at\" timestamp NOT NULL,\nCONSTRAINT \"profiles_users_id_fk\" FOREIGN KEY (\"user_id\") REFERENCES \"users\" (\"id\") ON UPDATE CASCADE ON DELETE SET NULL\n);COMMIT TRANSACTION;BEGIN TRANSACTION;`\n\n\tres, _ := fizz.AString(`\n\tcreate_table(\"users\") {\n\t\tt.Column(\"id\", \"INT\", {\"primary\": true})\n\t\tt.Column(\"email\", \"string\", {\"size\":20})\n\t}\n\tcreate_table(\"profiles\") {\n\t\tt.Column(\"id\", \"INT\", {\"primary\": true})\n\t\tt.Column(\"user_id\", \"INT\", {})\n\t\tt.Column(\"first_name\", \"string\", {})\n\t\tt.Column(\"last_name\", \"string\", {})\n\t\tt.ForeignKey(\"user_id\", {\"users\": [\"id\"]}, {\"on_delete\": \"SET NULL\", \"on_update\":\"CASCADE\"})\n\t}\n\t`, p.crdbt())\n\tr.Equal(ddl, res)\n}\n\nfunc (p *CockroachSuite) Test_Cockroach_CreateTables_WithCompositePrimaryKey() {\n\tr := p.Require()\n\tddl := `CREATE TABLE \"user_profiles\" (\n\"user_id\" INT NOT NULL,\n\"profile_id\" INT NOT NULL,\n\"created_at\" timestamp NOT NULL,\n\"updated_at\" timestamp NOT NULL,\nPRIMARY KEY(\"user_id\", \"profile_id\")\n);COMMIT TRANSACTION;BEGIN TRANSACTION;`\n\n\tres, _ := fizz.AString(`\n\tcreate_table(\"user_profiles\") {\n\t\tt.Column(\"user_id\", \"INT\")\n\t\tt.Column(\"profile_id\", \"INT\")\n\t\tt.PrimaryKey(\"user_id\", \"profile_id\")\n\t}\n\t`, p.crdbt())\n\tr.Equal(ddl, res)\n}\n\nfunc (p *CockroachSuite) Test_Cockroach_DropTable() {\n\tr := p.Require()\n\n\tddl := `DROP TABLE \"users\";COMMIT TRANSACTION;BEGIN TRANSACTION;`\n\n\tres, _ := fizz.AString(`drop_table(\"users\")`, p.crdbt())\n\tr.Equal(ddl, res)\n}\n\nfunc (p *CockroachSuite) Test_Cockroach_RenameTable() {\n\tr := p.Require()\n\n\tddl := `ALTER TABLE \"users\" RENAME TO \"people\";COMMIT TRANSACTION;BEGIN TRANSACTION;`\n\n\tres, _ := fizz.AString(`rename_table(\"users\", \"people\")`, p.crdbt())\n\tr.Equal(ddl, res)\n}\n\nfunc (p *CockroachSuite) Test_Cockroach_RenameTable_NotEnoughValues() {\n\tr := p.Require()\n\n\t_, err := p.crdbt().RenameTable([]fizz.Table{})\n\tr.Error(err)\n}\n\nfunc (p *CockroachSuite) Test_Cockroach_ChangeColumn() {\n\tr := p.Require()\n\tddl := `ALTER TABLE \"mytable\" RENAME COLUMN \"mycolumn\" TO \"_mycolumn_tmp\";COMMIT TRANSACTION;BEGIN TRANSACTION;\nALTER TABLE \"mytable\" ADD COLUMN \"mycolumn\" VARCHAR (50) NOT NULL DEFAULT 'foo';COMMIT TRANSACTION;BEGIN TRANSACTION;\nUPDATE \"mytable\" SET \"mycolumn\" = \"_mycolumn_tmp\";COMMIT TRANSACTION;BEGIN TRANSACTION;\nALTER TABLE \"mytable\" DROP COLUMN \"_mycolumn_tmp\";COMMIT TRANSACTION;BEGIN TRANSACTION;`\n\n\tres, _ := fizz.AString(`change_column(\"mytable\", \"mycolumn\", \"string\", {\"default\": \"foo\", \"size\": 50})`, p.crdbt())\n\n\tr.Equal(ddl, res)\n}\n\nfunc (p *CockroachSuite) Test_Cockroach_AddColumn() {\n\tr := p.Require()\n\tddl := `ALTER TABLE \"mytable\" ADD COLUMN \"mycolumn\" VARCHAR (50) NOT NULL DEFAULT 'foo';COMMIT TRANSACTION;BEGIN TRANSACTION;`\n\n\tres, _ := fizz.AString(`add_column(\"mytable\", \"mycolumn\", \"string\", {\"default\": \"foo\", \"size\": 50})`, p.crdbt())\n\n\tr.Equal(ddl, res)\n}\n\nfunc (p *CockroachSuite) Test_Cockroach_DropColumn() {\n\tr := p.Require()\n\tddl := `ALTER TABLE \"table_name\" DROP COLUMN \"column_name\";COMMIT TRANSACTION;BEGIN TRANSACTION;`\n\n\tres, _ := fizz.AString(`drop_column(\"table_name\", \"column_name\")`, p.crdbt())\n\n\tr.Equal(ddl, res)\n}\n\nfunc (p *CockroachSuite) Test_Cockroach_RenameColumn() {\n\tr := p.Require()\n\tddl := `ALTER TABLE \"table_name\" RENAME COLUMN \"old_column\" TO \"new_column\";COMMIT TRANSACTION;BEGIN TRANSACTION;`\n\n\tres, _ := fizz.AString(`rename_column(\"table_name\", \"old_column\", \"new_column\")`, p.crdbt())\n\tr.Equal(ddl, res)\n}\n\nfunc (p *CockroachSuite) Test_Cockroach_AddIndex() {\n\tr := p.Require()\n\tddl := `CREATE INDEX \"table_name_column_name_idx\" ON \"table_name\" (column_name);COMMIT TRANSACTION;BEGIN TRANSACTION;`\n\n\tres, _ := fizz.AString(`add_index(\"table_name\", \"column_name\", {})`, p.crdbt())\n\tr.Equal(ddl, res)\n}\n\nfunc (p *CockroachSuite) Test_Cockroach_AddIndex_Unique() {\n\tr := p.Require()\n\tddl := `CREATE UNIQUE INDEX \"table_name_column_name_idx\" ON \"table_name\" (column_name);COMMIT TRANSACTION;BEGIN TRANSACTION;`\n\n\tres, _ := fizz.AString(`add_index(\"table_name\", \"column_name\", {\"unique\": true})`, p.crdbt())\n\tr.Equal(ddl, res)\n}\n\nfunc (p *CockroachSuite) Test_Cockroach_AddIndex_MultiColumn() {\n\tr := p.Require()\n\tddl := `CREATE INDEX \"table_name_col1_col2_col3_idx\" ON \"table_name\" (col1, col2, col3);COMMIT TRANSACTION;BEGIN TRANSACTION;`\n\n\tres, _ := fizz.AString(`add_index(\"table_name\", [\"col1\", \"col2\", \"col3\"], {})`, p.crdbt())\n\tr.Equal(ddl, res)\n}\n\nfunc (p *CockroachSuite) Test_Cockroach_AddIndex_CustomName() {\n\tr := p.Require()\n\tddl := `CREATE INDEX \"custom_name\" ON \"table_name\" (column_name);COMMIT TRANSACTION;BEGIN TRANSACTION;`\n\n\tres, _ := fizz.AString(`add_index(\"table_name\", \"column_name\", {\"name\": \"custom_name\"})`, p.crdbt())\n\tr.Equal(ddl, res)\n}\n\nfunc (p *CockroachSuite) Test_Cockroach_DropIndex() {\n\tr := p.Require()\n\tddl := `DROP INDEX IF EXISTS \"my_idx\";COMMIT TRANSACTION;BEGIN TRANSACTION;`\n\n\tres, _ := fizz.AString(`drop_index(\"users\", \"my_idx\")`, p.crdbt())\n\tr.Equal(ddl, res)\n}\n\nfunc (p *CockroachSuite) Test_Cockroach_RenameIndex() {\n\tr := p.Require()\n\n\tddl := `ALTER INDEX \"table\"@\"old_ix\" RENAME TO \"new_ix\";COMMIT TRANSACTION;BEGIN TRANSACTION;`\n\n\tres, _ := fizz.AString(`rename_index(\"table\", \"old_ix\", \"new_ix\")`, p.crdbt())\n\tr.Equal(ddl, res)\n}\n\nfunc (p *CockroachSuite) buildSchema() translators.Schema {\n\tschema := map[string]*fizz.Table{}\n\tta := &fizz.Table{Name: \"testTable\"}\n\tta.Column(\"testColumn\", \"type\", nil)\n\tta.Indexes = append(ta.Indexes, fizz.Index{Name: \"testIndex\"})\n\tschema[\"testTable\"] = ta\n\treturn translators.CreateSchema(\"name\", \"url\", schema)\n}\n\nfunc (p *CockroachSuite) Test_Cockroach_AddForeignKey() {\n\tr := p.Require()\n\n\tddl := `ALTER TABLE \"profiles\" ADD CONSTRAINT \"profiles_users_id_fk\" FOREIGN KEY (\"user_id\") REFERENCES \"users\" (\"id\");COMMIT TRANSACTION;BEGIN TRANSACTION;`\n\n\tres, _ := fizz.AString(`add_foreign_key(\"profiles\", \"user_id\", {\"users\": [\"id\"]}, {})`, p.crdbt())\n\tr.Equal(ddl, res)\n}\n\nfunc (p *CockroachSuite) Test_Cockroach_DropForeignKey() {\n\tr := p.Require()\n\n\tddl := `ALTER TABLE \"profiles\" DROP CONSTRAINT \"profiles_users_id_fk\";COMMIT TRANSACTION;BEGIN TRANSACTION;`\n\n\tres, _ := fizz.AString(`drop_foreign_key(\"profiles\", \"profiles_users_id_fk\", {})`, p.crdbt())\n\tr.Equal(ddl, res)\n}\n\nfunc (p *CockroachSuite) Test_Cockroach_CreateTable_With_DefaultRaw_Value_In_Primary_Field() {\n\tr := p.Require()\n\tddl := `CREATE TABLE \"test_cockroach_createtable_with_default_value_in_primary_field\" (\n\"primary_field\" UUID NOT NULL DEFAULT gen_random_uuid(),\nPRIMARY KEY(\"primary_field\"),\n\"normal_field\" UUID NOT NULL DEFAULT gen_random_uuid(),\n\"created_at\" timestamp NOT NULL,\n\"updated_at\" timestamp NOT NULL\n);COMMIT TRANSACTION;BEGIN TRANSACTION;`\n\n\tres, _ := fizz.AString(`\n\tcreate_table(\"test_cockroach_createtable_with_default_value_in_primary_field\") {\n\t\tt.Column(\"primary_field\", \"uuid\", {\"primary\": true, default_raw: \"gen_random_uuid()\"})\n\t\tt.Column(\"normal_field\", \"uuid\", {default_raw: \"gen_random_uuid()\"})\n\t}\n\t`, p.crdbt())\n\tr.Equal(ddl, res)\n}\n"
  },
  {
    "path": "translators/mariadb.go",
    "content": "package translators\n\n// MariaDB is a MariaDB-specific translator.\ntype MariaDB struct {\n\t*MySQL\n}\n\n// NewMariaDB constructs a new MariaDB translator.\nfunc NewMariaDB(url, name string) *MariaDB {\n\tmd := NewMySQL(url, name)\n\tmd.strDefaultSize = 191\n\treturn &MariaDB{\n\t\tMySQL: md,\n\t}\n}\n\nfunc (MariaDB) Name() string {\n\treturn \"mariadb\"\n}\n"
  },
  {
    "path": "translators/mariadb_test.go",
    "content": "package translators_test\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/gobuffalo/fizz\"\n\t\"github.com/gobuffalo/fizz/translators\"\n)\n\nvar _ fizz.Translator = (*translators.MariaDB)(nil)\nvar mat = translators.NewMariaDB(\"\", \"\")\n\nfunc init() {\n\tu := \"%s:%s@(%s:%s)/%s?parseTime=true&multiStatements=true&readTimeout=1s&collation=%s\"\n\tu = fmt.Sprintf(u, getEnv(\"MYSQL_USER\", \"root\"), getEnv(\"MYSQL_PASSWORD\", \"\"), getEnv(\"MYSQL_HOST\", \"127.0.0.1\"), getEnv(\"MYSQL_PORT\", \"3306\"), \"pop_test\", \"utf8mb4_general_ci\")\n\tmat = translators.NewMariaDB(u, \"pop_test\")\n}\n\nfunc (p *MariaDBSuite) Test_MySQL_SchemaMigration() {\n\tr := p.Require()\n\tddl := `CREATE TABLE ` + \"`schema_migrations`\" + ` (\n` + \"`version`\" + ` VARCHAR (191) NOT NULL\n) ENGINE=InnoDB;\nCREATE UNIQUE INDEX ` + \"`version_idx`\" + ` ON ` + \"`schema_migrations`\" + ` (` + \"`version`\" + `);`\n\tres, err := mat.CreateTable(fizz.Table{\n\t\tName: \"schema_migrations\",\n\t\tColumns: []fizz.Column{\n\t\t\t{Name: \"version\", ColType: \"string\"},\n\t\t},\n\t\tIndexes: []fizz.Index{\n\t\t\t{Name: \"version_idx\", Columns: []string{\"version\"}, Unique: true},\n\t\t},\n\t})\n\tr.NoError(err)\n\tr.Equal(ddl, res)\n}\n"
  },
  {
    "path": "translators/mssqlserver.go",
    "content": "package translators\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/gobuffalo/fizz\"\n)\n\n// MsSqlServer is a MS SqlServer-specific translator.\ntype MsSqlServer struct{}\n\n// NewMsSqlServer constructs a new MsSqlServer translator.\nfunc NewMsSqlServer() *MsSqlServer {\n\treturn &MsSqlServer{}\n}\n\nfunc (MsSqlServer) Name() string {\n\treturn \"mssqlserver\"\n}\n\nfunc (p *MsSqlServer) CreateTable(t fizz.Table) (string, error) {\n\tsql := []string{}\n\tcols := []string{}\n\tvar s string\n\tfor _, c := range t.Columns {\n\t\tif c.Primary {\n\t\t\ts = fmt.Sprintf(\"%s %s PRIMARY KEY\", c.Name, p.colType(c))\n\t\t\tif c.Primary && ((c.ColType == \"integer\" || strings.ToLower(c.ColType) == \"int\") || (strings.ToLower(c.ColType) == \"bigint\")) {\n\t\t\t\ts = fmt.Sprintf(\"%s IDENTITY(1,1)\", s)\n\t\t\t}\n\t\t} else {\n\t\t\ts = p.buildAddColumn(t.Name, c)\n\t\t}\n\t\tcols = append(cols, s)\n\t}\n\n\tprimaryKeys := t.PrimaryKeys()\n\tif len(primaryKeys) > 1 {\n\t\tpks := make([]string, len(primaryKeys))\n\t\tfor i, pk := range primaryKeys {\n\t\t\tpks[i] = fmt.Sprintf(\"[%s]\", pk)\n\t\t}\n\t\tcols = append(cols, fmt.Sprintf(\"PRIMARY KEY(%s)\", strings.Join(pks, \", \")))\n\t}\n\n\ts = fmt.Sprintf(\"CREATE TABLE %s (\\n%s\\n);\", t.Name, strings.Join(cols, \",\\n\"))\n\tsql = append(sql, s)\n\n\tfor _, i := range t.Indexes {\n\t\ts, err := p.AddIndex(fizz.Table{\n\t\t\tName:    t.Name,\n\t\t\tIndexes: []fizz.Index{i},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tsql = append(sql, s)\n\t}\n\tfor _, fk := range t.ForeignKeys {\n\t\tsql = append(sql, p.buildForeignKey(t, fk))\n\t}\n\treturn strings.Join(sql, \"\\n\"), nil\n}\n\nfunc (p *MsSqlServer) DropTable(t fizz.Table) (string, error) {\n\treturn fmt.Sprintf(\"DROP TABLE %s;\", t.Name), nil\n}\n\nfunc (p *MsSqlServer) RenameTable(t []fizz.Table) (string, error) {\n\tif len(t) < 2 {\n\t\treturn \"\", fmt.Errorf(\"Not enough table names supplied\")\n\t}\n\treturn fmt.Sprintf(\"EXEC sp_rename '%s', '%s';\", t[0].Name, t[1].Name), nil\n}\n\nfunc (p *MsSqlServer) ChangeColumn(t fizz.Table) (string, error) {\n\tif len(t.Columns) == 0 {\n\t\treturn \"\", fmt.Errorf(\"Not enough columns supplied\")\n\t}\n\tc := t.Columns[0]\n\n\tcmds := make([]string, 0)\n\ts := fmt.Sprintf(\"ALTER TABLE %s ALTER COLUMN %s %s\", t.Name, c.Name, p.colType(c))\n\tif c.Options[\"null\"] == nil {\n\t\ts = fmt.Sprintf(\"%s NOT NULL\", s)\n\t} else {\n\t\ts = fmt.Sprintf(\"%s NULL\", s)\n\t}\n\tcmds = append(cmds, s)\n\tsetDefault := c.Options[\"default\"] != nil || c.Options[\"default_raw\"] != nil\n\tif setDefault {\n\t\tdfConstraintName := fmt.Sprintf(\"DF_%s_%s\", t.Name, c.Name)\n\t\tcmds = append(cmds, fmt.Sprintf(\"ALTER TABLE %s DROP CONSTRAINT IF EXISTS %s;\", t.Name, dfConstraintName))\n\t\ts := fmt.Sprintf(\"ALTER TABLE %s ADD CONSTRAINT %s DEFAULT\", t.Name, dfConstraintName)\n\t\tif c.Options[\"default\"] != nil {\n\t\t\tcmds = append(cmds, fmt.Sprintf(\"%s '%v' FOR %s;\", s, c.Options[\"default\"], c.Name))\n\t\t}\n\t\tif c.Options[\"default_raw\"] != nil {\n\t\t\tcmds = append(cmds, fmt.Sprintf(\"%s %s FOR %s;\", s, c.Options[\"default_raw\"], c.Name))\n\t\t}\n\t}\n\tif len(cmds) > 0 {\n\t\treturn strings.Join(cmds, \"\\n\"), nil\n\t}\n\treturn \"\", nil\n}\n\nfunc (p *MsSqlServer) AddColumn(t fizz.Table) (string, error) {\n\tif len(t.Columns) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough columns supplied\")\n\t}\n\t//if _, ok := t.Columns[0].Options[\"first\"]; ok {\n\t//\treturn \"\", fmt.Errorf(\"T-SQL does not support adding column at a specific position.\")\n\t//}\n\t//\n\t//if _, ok := t.Columns[0].Options[\"after\"]; ok {\n\t//\treturn \"\", fmt.Errorf(\"T-SQL does not support adding column at a specific position.\")\n\t//}\n\tc := t.Columns[0]\n\ts := fmt.Sprintf(\"ALTER TABLE %s ADD %s;\", t.Name, p.buildAddColumn(t.Name, c))\n\n\treturn s, nil\n}\n\nfunc (p *MsSqlServer) DropColumn(t fizz.Table) (string, error) {\n\tif len(t.Columns) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough columns supplied\")\n\t}\n\tc := t.Columns[0]\n\treturn fmt.Sprintf(\"ALTER TABLE %s DROP COLUMN %s;\", t.Name, c.Name), nil\n}\n\nfunc (p *MsSqlServer) RenameColumn(t fizz.Table) (string, error) {\n\tif len(t.Columns) < 2 {\n\t\treturn \"\", fmt.Errorf(\"not enough columns supplied\")\n\t}\n\toc := t.Columns[0]\n\tnc := t.Columns[1]\n\ts := fmt.Sprintf(\"EXEC sp_rename '%s.%s', '%s', 'COLUMN';\", t.Name, oc.Name, nc.Name)\n\treturn s, nil\n}\n\nfunc (p *MsSqlServer) AddIndex(t fizz.Table) (string, error) {\n\tif len(t.Indexes) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough indexes supplied\")\n\t}\n\ti := t.Indexes[0]\n\ts := fmt.Sprintf(\"CREATE INDEX %s ON %s (%s);\", i.Name, t.Name, strings.Join(i.Columns, \", \"))\n\tif i.Unique {\n\t\ts = strings.Replace(s, \"CREATE\", \"CREATE UNIQUE\", 1)\n\t}\n\treturn s, nil\n}\n\nfunc (p *MsSqlServer) DropIndex(t fizz.Table) (string, error) {\n\tif len(t.Indexes) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough indexes supplied\")\n\t}\n\ti := t.Indexes[0]\n\treturn fmt.Sprintf(\"DROP INDEX %s ON %s;\", i.Name, t.Name), nil\n}\n\nfunc (p *MsSqlServer) RenameIndex(t fizz.Table) (string, error) {\n\tix := t.Indexes\n\tif len(ix) < 2 {\n\t\treturn \"\", fmt.Errorf(\"not enough indexes supplied\")\n\t}\n\toi := ix[0]\n\tni := ix[1]\n\treturn fmt.Sprintf(\"EXEC sp_rename '%s.%s', '%s', 'INDEX';\", t.Name, oi.Name, ni.Name), nil\n}\n\nfunc (p *MsSqlServer) AddForeignKey(t fizz.Table) (string, error) {\n\tif len(t.ForeignKeys) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough foreign keys supplied\")\n\t}\n\n\treturn p.buildForeignKey(t, t.ForeignKeys[0]), nil\n}\n\nfunc (p *MsSqlServer) DropForeignKey(t fizz.Table) (string, error) {\n\tif len(t.ForeignKeys) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough foreign keys supplied\")\n\t}\n\n\tfk := t.ForeignKeys[0]\n\n\tvar ifExists string\n\tif v, ok := fk.Options[\"if_exists\"]; ok && v.(bool) {\n\t\tifExists = \"IF EXISTS\"\n\t}\n\n\ts := fmt.Sprintf(\"ALTER TABLE %s DROP CONSTRAINT %s %s;\", t.Name, ifExists, fk.Name)\n\treturn s, nil\n}\n\nfunc (p *MsSqlServer) buildAddColumn(tableName string, c fizz.Column) string {\n\ts := fmt.Sprintf(\"%s %s\", c.Name, p.colType(c))\n\tif c.Options[\"null\"] == nil {\n\t\ts = fmt.Sprintf(\"%s NOT NULL\", s)\n\t}\n\tsetDefault := c.Options[\"default\"] != nil || c.Options[\"default_raw\"] != nil\n\tif setDefault {\n\t\tdfConstraintName := fmt.Sprintf(\"DF_%s_%s\", tableName, c.Name)\n\t\tif c.Options[\"default\"] != nil {\n\t\t\ts = fmt.Sprintf(\"%s CONSTRAINT %s DEFAULT '%v'\", s, dfConstraintName, c.Options[\"default\"])\n\t\t}\n\t\tif c.Options[\"default_raw\"] != nil {\n\t\t\ts = fmt.Sprintf(\"%s CONSTRAINT %s DEFAULT %s\", s, dfConstraintName, c.Options[\"default_raw\"])\n\t\t}\n\t}\n\n\treturn s\n}\n\nfunc (p *MsSqlServer) colType(c fizz.Column) string {\n\tswitch c.ColType {\n\tcase \"integer\":\n\t\treturn \"INT\"\n\tcase \"string\":\n\t\ts := \"255\"\n\t\tif c.Options[\"size\"] != nil {\n\t\t\ts = fmt.Sprintf(\"%d\", c.Options[\"size\"])\n\t\t}\n\t\treturn fmt.Sprintf(\"NVARCHAR (%s)\", s)\n\tcase \"uuid\":\n\t\treturn \"uniqueidentifier\"\n\tcase \"blob\":\n\t\treturn \"VARBINARY(MAX)\"\n\tcase \"float\", \"decimal\":\n\t\tif c.Options[\"precision\"] != nil {\n\t\t\tprecision := c.Options[\"precision\"]\n\t\t\tif c.Options[\"scale\"] != nil {\n\t\t\t\tscale := c.Options[\"scale\"]\n\t\t\t\treturn fmt.Sprintf(\"DECIMAL(%d,%d)\", precision, scale)\n\t\t\t}\n\t\t\treturn fmt.Sprintf(\"DECIMAL(%d)\", precision)\n\t\t}\n\n\t\treturn \"DECIMAL\"\n\tcase \"timestamp\":\n\t\treturn \"DATETIME\"\n\tcase \"boolean\":\n\t\treturn \"BIT\"\n\tdefault:\n\t\treturn c.ColType\n\t}\n}\n\nfunc (p *MsSqlServer) buildForeignKey(t fizz.Table, fk fizz.ForeignKey) string {\n\trefs := fmt.Sprintf(\"%s (%s)\", fk.References.Table, strings.Join(fk.References.Columns, \", \"))\n\ts := fmt.Sprintf(\"FOREIGN KEY (%s) REFERENCES %s\", fk.Column, refs)\n\ts = fmt.Sprintf(\"ALTER TABLE %s ADD CONSTRAINT %s %s;\", t.Name, fk.Name, s)\n\treturn s\n}\n"
  },
  {
    "path": "translators/mssqlserver_test.go",
    "content": "package translators_test\n\nimport (\n\t\"github.com/gobuffalo/fizz\"\n\t\"github.com/gobuffalo/fizz/translators\"\n)\n\nvar _ fizz.Translator = (*translators.MsSqlServer)(nil)\nvar sqlsrv = translators.NewMsSqlServer()\n\nfunc (p *MsSqlServerSQLSuite) Test_MsSqlServer_SchemaMigration() {\n\tr := p.Require()\n\tddl := `CREATE TABLE schema_migrations (\nversion NVARCHAR (255) NOT NULL\n);\nCREATE UNIQUE INDEX version_idx ON schema_migrations (version);`\n\n\tres, err := sqlsrv.CreateTable(fizz.Table{\n\t\tName: \"schema_migrations\",\n\t\tColumns: []fizz.Column{\n\t\t\t{Name: \"version\", ColType: \"string\"},\n\t\t},\n\t\tIndexes: []fizz.Index{\n\t\t\t{Name: \"version_idx\", Columns: []string{\"version\"}, Unique: true},\n\t\t},\n\t})\n\tr.NoError(err)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MsSqlServerSQLSuite) Test_MsSqlServer_CreateTable() {\n\tr := p.Require()\n\tddl := `CREATE TABLE users (\nid INT PRIMARY KEY IDENTITY(1,1),\nfirst_name NVARCHAR (255) NOT NULL,\nlast_name NVARCHAR (255) NOT NULL,\nemail NVARCHAR (20) NOT NULL,\npermissions text,\nage INT CONSTRAINT DF_users_age DEFAULT '40',\nraw VARBINARY(MAX) NOT NULL,\ncreated_at DATETIME NOT NULL,\nupdated_at DATETIME NOT NULL\n);`\n\n\tres, _ := fizz.AString(`\n\tcreate_table(\"users\") {\n\t\tt.Column(\"first_name\", \"string\", {})\n\t\tt.Column(\"last_name\", \"string\", {})\n\t\tt.Column(\"email\", \"string\", {\"size\":20})\n\t\tt.Column(\"permissions\", \"text\", {\"null\": true})\n\t\tt.Column(\"age\", \"integer\", {\"null\": true, \"default\": 40})\n\t\tt.Column(\"raw\", \"blob\", {})\n\t}\n\t`, sqlsrv)\n\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MsSqlServerSQLSuite) Test_MsSqlServer_CreateTable_UUID() {\n\tr := p.Require()\n\tddl := `CREATE TABLE users (\nfirst_name NVARCHAR (255) NOT NULL,\nlast_name NVARCHAR (255) NOT NULL,\nemail NVARCHAR (20) NOT NULL,\npermissions text,\nage INT CONSTRAINT DF_users_age DEFAULT '40',\nuuid uniqueidentifier PRIMARY KEY,\ncreated_at DATETIME NOT NULL,\nupdated_at DATETIME NOT NULL\n);`\n\n\tres, _ := fizz.AString(`\n\tcreate_table(\"users\") {\n\t\tt.Column(\"first_name\", \"string\", {})\n\t\tt.Column(\"last_name\", \"string\", {})\n\t\tt.Column(\"email\", \"string\", {\"size\":20})\n\t\tt.Column(\"permissions\", \"text\", {\"null\": true})\n\t\tt.Column(\"age\", \"integer\", {\"null\": true, \"default\": 40})\n\t\tt.Column(\"uuid\", \"uuid\", {\"primary\": true})\n\t}\n\t`, sqlsrv)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MsSqlServerSQLSuite) Test_MsSqlServer_CreateTables_WithForeignKeys() {\n\tr := p.Require()\n\tddl := `CREATE TABLE users (\nid INT PRIMARY KEY IDENTITY(1,1),\nemail NVARCHAR (20) NOT NULL,\ncreated_at DATETIME NOT NULL,\nupdated_at DATETIME NOT NULL\n);\nCREATE TABLE profiles (\nid INT PRIMARY KEY IDENTITY(1,1),\nuser_id INT NOT NULL,\nfirst_name NVARCHAR (255) NOT NULL,\nlast_name NVARCHAR (255) NOT NULL,\ncreated_at DATETIME NOT NULL,\nupdated_at DATETIME NOT NULL\n);\nALTER TABLE profiles ADD CONSTRAINT profiles_users_id_fk FOREIGN KEY (user_id) REFERENCES users (id);`\n\n\tres, _ := fizz.AString(`\n\tcreate_table(\"users\") {\n\t\tt.Column(\"id\", \"INT\", {\"primary\": true})\n\t\tt.Column(\"email\", \"string\", {\"size\":20})\n\t}\n\tcreate_table(\"profiles\") {\n\t\tt.Column(\"id\", \"INT\", {\"primary\": true})\n\t\tt.Column(\"user_id\", \"INT\", {})\n\t\tt.Column(\"first_name\", \"string\", {})\n\t\tt.Column(\"last_name\", \"string\", {})\n\t\tt.ForeignKey(\"user_id\", {\"users\": [\"id\"]}, {})\n\t}\n\t`, sqlsrv)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MsSqlServerSQLSuite) Test_MsSqlServer_CreateTables_WithCompositePrimaryKey() {\n\tr := p.Require()\n\tddl := `CREATE TABLE user_profiles (\nuser_id INT NOT NULL,\nprofile_id INT NOT NULL,\ncreated_at DATETIME NOT NULL,\nupdated_at DATETIME NOT NULL\nPRIMARY KEY([user_id], [profile_id])\n);`\n\n\tres, _ := fizz.AString(`\n\tcreate_table(\"user_profiles\") {\n\t\tt.Column(\"user_id\", \"INT\")\n\t\tt.Column(\"profile_id\", \"INT\")\n\t\tt.PrimaryKey(\"user_id\", \"profile_id\")\n\t}\n\t`, sqlsrv)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MsSqlServerSQLSuite) Test_MsSqlServer_DropTable() {\n\tr := p.Require()\n\n\tddl := `DROP TABLE users;`\n\n\tres, _ := fizz.AString(`drop_table(\"users\")`, sqlsrv)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MsSqlServerSQLSuite) Test_MsSqlServer_RenameTable() {\n\tr := p.Require()\n\n\tddl := `EXEC sp_rename 'users', 'people';`\n\n\tres, _ := fizz.AString(`rename_table(\"users\", \"people\")`, sqlsrv)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MsSqlServerSQLSuite) Test_MsSqlServer_RenameTable_NotEnoughValues() {\n\tr := p.Require()\n\n\t_, err := sqlsrv.RenameTable([]fizz.Table{})\n\tr.Error(err)\n}\n\nfunc (p *MsSqlServerSQLSuite) Test_MsSqlServer_ChangeColumn() {\n\tr := p.Require()\n\tddl := `ALTER TABLE users ALTER COLUMN mycolumn NVARCHAR (50) NOT NULL\nALTER TABLE users DROP CONSTRAINT IF EXISTS DF_users_mycolumn;\nALTER TABLE users ADD CONSTRAINT DF_users_mycolumn DEFAULT 'foo' FOR mycolumn;`\n\n\tres, _ := fizz.AString(`change_column(\"users\", \"mycolumn\", \"string\", {\"default\": \"foo\", \"size\": 50})`, sqlsrv)\n\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MsSqlServerSQLSuite) Test_MsSqlServer_AddColumn() {\n\tr := p.Require()\n\tddl := `ALTER TABLE users ADD mycolumn NVARCHAR (50) NOT NULL CONSTRAINT DF_users_mycolumn DEFAULT 'foo';`\n\n\tres, _ := fizz.AString(`add_column(\"users\", \"mycolumn\", \"string\", {\"default\": \"foo\", \"size\": 50})`, sqlsrv)\n\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MsSqlServerSQLSuite) Test_MsSqlServer_DropColumn() {\n\tr := p.Require()\n\tddl := `ALTER TABLE users DROP COLUMN mycolumn;`\n\n\tres, _ := fizz.AString(`drop_column(\"users\", \"mycolumn\")`, sqlsrv)\n\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MsSqlServerSQLSuite) Test_MsSqlServer_RenameColumn() {\n\tr := p.Require()\n\tddl := `EXEC sp_rename 'users.email', 'email_address', 'COLUMN';`\n\n\tres, _ := fizz.AString(`rename_column(\"users\", \"email\", \"email_address\")`, sqlsrv)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MsSqlServerSQLSuite) Test_MsSqlServer_AddIndex() {\n\tr := p.Require()\n\tddl := `CREATE INDEX users_email_idx ON users (email);`\n\n\tres, _ := fizz.AString(`add_index(\"users\", \"email\", {})`, sqlsrv)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MsSqlServerSQLSuite) Test_MsSqlServer_AddIndex_Unique() {\n\tr := p.Require()\n\tddl := `CREATE UNIQUE INDEX users_email_idx ON users (email);`\n\n\tres, _ := fizz.AString(`add_index(\"users\", \"email\", {\"unique\": true})`, sqlsrv)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MsSqlServerSQLSuite) Test_MsSqlServer_AddIndex_MultiColumn() {\n\tr := p.Require()\n\tddl := `CREATE INDEX users_id_email_idx ON users (id, email);`\n\n\tres, _ := fizz.AString(`add_index(\"users\", [\"id\", \"email\"], {})`, sqlsrv)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MsSqlServerSQLSuite) Test_MsSqlServer_AddIndex_CustomName() {\n\tr := p.Require()\n\tddl := `CREATE INDEX email_index ON users (email);`\n\n\tres, _ := fizz.AString(`add_index(\"users\", \"email\", {\"name\": \"email_index\"})`, sqlsrv)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MsSqlServerSQLSuite) Test_MsSqlServer_DropIndex() {\n\tr := p.Require()\n\tddl := `DROP INDEX email_idx ON users;`\n\n\tres, _ := fizz.AString(`drop_index(\"users\", \"email_idx\")`, sqlsrv)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MsSqlServerSQLSuite) Test_MsSqlServer_RenameIndex() {\n\tr := p.Require()\n\n\tddl := `EXEC sp_rename 'users.email_idx', 'email_address_ix', 'INDEX';`\n\n\tres, _ := fizz.AString(`rename_index(\"users\", \"email_idx\", \"email_address_ix\")`, sqlsrv)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MsSqlServerSQLSuite) Test_MsSqlServer_AddForeignKey() {\n\tr := p.Require()\n\tddl := `ALTER TABLE profiles ADD CONSTRAINT profiles_users_id_fk FOREIGN KEY (user_id) REFERENCES users (id);`\n\n\tres, _ := fizz.AString(`add_foreign_key(\"profiles\", \"user_id\", {\"users\": [\"id\"]}, {})`, sqlsrv)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MsSqlServerSQLSuite) Test_MsSqlServer_DropForeignKey() {\n\tr := p.Require()\n\tddl := `ALTER TABLE profiles DROP CONSTRAINT  profiles_users_id_fk;`\n\n\tres, _ := fizz.AString(`drop_foreign_key(\"profiles\", \"profiles_users_id_fk\", {})`, sqlsrv)\n\tr.Equal(ddl, res)\n}\n"
  },
  {
    "path": "translators/mysql.go",
    "content": "package translators\n\nimport (\n\t\"fmt\"\n\t\"regexp\"\n\t\"strings\"\n\n\t\"github.com/gobuffalo/fizz\"\n)\n\n// MySQL is a MySQL-specific translator.\ntype MySQL struct {\n\tSchema         SchemaQuery\n\tstrDefaultSize int\n}\n\n// NewMySQL constructs a new MySQL translator.\nfunc NewMySQL(url, name string) *MySQL {\n\tschema := &mysqlSchema{Schema{URL: url, Name: name, schema: map[string]*fizz.Table{}}}\n\tschema.Builder = schema\n\treturn &MySQL{\n\t\tSchema:         schema,\n\t\tstrDefaultSize: 255,\n\t}\n}\n\nfunc (MySQL) Name() string {\n\treturn \"mysql\"\n}\n\n// CreateTable translates a fizz Table to its MySQL SQL definition.\nfunc (p *MySQL) CreateTable(t fizz.Table) (string, error) {\n\tsql := []string{}\n\tcols := []string{}\n\tfor _, c := range t.Columns {\n\t\tcols = append(cols, p.buildColumn(c))\n\t\tif c.Primary {\n\t\t\tcols = append(cols, fmt.Sprintf(\"PRIMARY KEY(`%s`)\", c.Name))\n\t\t}\n\t}\n\n\tfor _, fk := range t.ForeignKeys {\n\t\tcols = append(cols, p.buildForeignKey(t, fk, true))\n\t}\n\n\tprimaryKeys := t.PrimaryKeys()\n\tif len(primaryKeys) > 1 {\n\t\tpks := make([]string, len(primaryKeys))\n\t\tfor i, pk := range primaryKeys {\n\t\t\tpks[i] = fmt.Sprintf(\"`%s`\", pk)\n\t\t}\n\t\tcols = append(cols, fmt.Sprintf(\"PRIMARY KEY(%s)\", strings.Join(pks, \", \")))\n\t}\n\n\ts := fmt.Sprintf(\"CREATE TABLE %s (\\n%s\\n) ENGINE=InnoDB;\", p.escapeIdentifier(t.Name), strings.Join(cols, \",\\n\"))\n\tsql = append(sql, s)\n\n\tfor _, i := range t.Indexes {\n\t\ts, err := p.AddIndex(fizz.Table{\n\t\t\tName:    t.Name,\n\t\t\tIndexes: []fizz.Index{i},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tsql = append(sql, s)\n\t}\n\n\treturn strings.Join(sql, \"\\n\"), nil\n}\n\nfunc (p *MySQL) DropTable(t fizz.Table) (string, error) {\n\treturn fmt.Sprintf(\"DROP TABLE %s;\", p.escapeIdentifier(t.Name)), nil\n}\n\nfunc (p *MySQL) RenameTable(t []fizz.Table) (string, error) {\n\tif len(t) < 2 {\n\t\treturn \"\", fmt.Errorf(\"not enough table names supplied\")\n\t}\n\treturn fmt.Sprintf(\"ALTER TABLE %s RENAME TO %s;\", p.escapeIdentifier(t[0].Name), p.escapeIdentifier(t[1].Name)), nil\n}\n\nfunc (p *MySQL) ChangeColumn(t fizz.Table) (string, error) {\n\tif len(t.Columns) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough columns supplied\")\n\t}\n\tc := t.Columns[0]\n\ts := fmt.Sprintf(\"ALTER TABLE %s MODIFY %s;\", p.escapeIdentifier(t.Name), p.buildColumn(c))\n\treturn s, nil\n}\n\nfunc (p *MySQL) AddColumn(t fizz.Table) (string, error) {\n\tif len(t.Columns) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough columns supplied\")\n\t}\n\n\tif _, ok := t.Columns[0].Options[\"first\"]; ok {\n\t\tc := t.Columns[0]\n\t\ts := fmt.Sprintf(\"ALTER TABLE %s ADD COLUMN %s FIRST;\", p.escapeIdentifier(t.Name), p.buildColumn(c))\n\t\treturn s, nil\n\t}\n\n\tif val, ok := t.Columns[0].Options[\"after\"]; ok {\n\t\tc := t.Columns[0]\n\t\ts := fmt.Sprintf(\"ALTER TABLE %s ADD COLUMN %s AFTER `%s`;\", p.escapeIdentifier(t.Name), p.buildColumn(c), val)\n\t\treturn s, nil\n\t}\n\n\tc := t.Columns[0]\n\ts := fmt.Sprintf(\"ALTER TABLE %s ADD COLUMN %s;\", p.escapeIdentifier(t.Name), p.buildColumn(c))\n\treturn s, nil\n}\n\nfunc (p *MySQL) DropColumn(t fizz.Table) (string, error) {\n\tif len(t.Columns) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough columns supplied\")\n\t}\n\tc := t.Columns[0]\n\treturn fmt.Sprintf(\"ALTER TABLE %s DROP COLUMN `%s`;\", p.escapeIdentifier(t.Name), c.Name), nil\n}\n\nfunc (p *MySQL) RenameColumn(t fizz.Table) (string, error) {\n\tif len(t.Columns) < 2 {\n\t\treturn \"\", fmt.Errorf(\"not enough columns supplied\")\n\t}\n\toc := t.Columns[0]\n\tnc := t.Columns[1]\n\n\tti, err := p.Schema.TableInfo(t.Name)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tvar c fizz.Column\n\tfor _, c = range ti.Columns {\n\t\tif c.Name == oc.Name {\n\t\t\tbreak\n\t\t}\n\t}\n\tcol := p.buildColumn(c)\n\tcol = strings.Replace(col, oc.Name, fmt.Sprintf(\"%s` `%s\", oc.Name, nc.Name), -1)\n\ts := fmt.Sprintf(\"ALTER TABLE %s CHANGE %s;\", p.escapeIdentifier(t.Name), col)\n\treturn s, nil\n}\n\nfunc (p *MySQL) AddIndex(t fizz.Table) (string, error) {\n\tif len(t.Indexes) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough indexes supplied\")\n\t}\n\ti := t.Indexes[0]\n\tcols := []string{}\n\tfor _, c := range i.Columns {\n\t\tcols = append(cols, fmt.Sprintf(\"`%s`\", c))\n\t}\n\ts := fmt.Sprintf(\"CREATE INDEX `%s` ON %s (%s);\", i.Name, p.escapeIdentifier(t.Name), strings.Join(cols, \", \"))\n\tif i.Unique {\n\t\ts = strings.Replace(s, \"CREATE\", \"CREATE UNIQUE\", 1)\n\t}\n\treturn s, nil\n}\n\nfunc (p *MySQL) DropIndex(t fizz.Table) (string, error) {\n\tif len(t.Indexes) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough indexes supplied\")\n\t}\n\ti := t.Indexes[0]\n\treturn fmt.Sprintf(\"DROP INDEX `%s` ON %s;\", i.Name, p.escapeIdentifier(t.Name)), nil\n}\n\nfunc (p *MySQL) RenameIndex(t fizz.Table) (string, error) {\n\tschema := p.Schema.(*mysqlSchema)\n\tversion, err := schema.Version()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif version.LessThan(mysql57Version) {\n\t\treturn \"\", fmt.Errorf(\"renaming indexes on MySQL versions less than 5.7 is not supported by fizz; use raw SQL instead\")\n\t}\n\tix := t.Indexes\n\tif len(ix) < 2 {\n\t\treturn \"\", fmt.Errorf(\"not enough indexes supplied\")\n\t}\n\toi := ix[0]\n\tni := ix[1]\n\treturn fmt.Sprintf(\"ALTER TABLE %s RENAME INDEX `%s` TO `%s`;\", p.escapeIdentifier(t.Name), oi.Name, ni.Name), nil\n}\n\nfunc (p *MySQL) AddForeignKey(t fizz.Table) (string, error) {\n\tif len(t.ForeignKeys) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough foreign keys supplied\")\n\t}\n\n\treturn p.buildForeignKey(t, t.ForeignKeys[0], false), nil\n}\n\nfunc (p *MySQL) DropForeignKey(t fizz.Table) (string, error) {\n\tif len(t.ForeignKeys) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough foreign keys supplied\")\n\t}\n\n\tfk := t.ForeignKeys[0]\n\n\tvar ifExists string\n\tif v, ok := fk.Options[\"if_exists\"]; ok && v.(bool) {\n\t\tifExists = \"IF EXISTS \"\n\t}\n\n\ts := fmt.Sprintf(\"ALTER TABLE %s DROP FOREIGN KEY %s`%s`;\", p.escapeIdentifier(t.Name), ifExists, fk.Name)\n\treturn s, nil\n}\n\nfunc (p *MySQL) buildColumn(c fizz.Column) string {\n\ts := fmt.Sprintf(\"`%s` %s\", c.Name, p.colType(c))\n\tif c.Options[\"null\"] == nil || c.Options[\"null\"] == \"false\" || c.Primary {\n\t\ts = fmt.Sprintf(\"%s NOT NULL\", s)\n\t}\n\tif c.Options[\"default\"] != nil {\n\t\td := fmt.Sprintf(\"%#v\", c.Options[\"default\"])\n\t\tre := regexp.MustCompile(\"^(\\\")(.+)(\\\")$\")\n\t\td = re.ReplaceAllString(d, \"'$2'\")\n\t\ts = fmt.Sprintf(\"%s DEFAULT %s\", s, d)\n\t}\n\tif c.Options[\"default_raw\"] != nil {\n\t\td := fmt.Sprintf(\"%s\", c.Options[\"default_raw\"])\n\t\ts = fmt.Sprintf(\"%s DEFAULT %s\", s, d)\n\t}\n\n\t// there are also tinyint, smallint, mediumint, and bigint\n\tif c.Primary && (c.ColType == \"integer\" || strings.HasSuffix(strings.ToLower(c.ColType), \"int\")) {\n\t\ts = fmt.Sprintf(\"%s AUTO_INCREMENT\", s)\n\t}\n\treturn s\n}\n\nfunc (p *MySQL) colType(c fizz.Column) string {\n\tswitch strings.ToLower(c.ColType) {\n\tcase \"string\":\n\t\ts := fmt.Sprintf(\"%d\", p.strDefaultSize)\n\t\tif c.Options[\"size\"] != nil {\n\t\t\ts = fmt.Sprintf(\"%d\", c.Options[\"size\"])\n\t\t}\n\t\treturn fmt.Sprintf(\"VARCHAR (%s)\", s)\n\tcase \"uuid\":\n\t\treturn \"char(36)\"\n\tcase \"timestamp\", \"time\", \"datetime\":\n\t\treturn \"DATETIME\"\n\tcase \"blob\", \"[]byte\":\n\t\treturn \"BLOB\"\n\tcase \"int\", \"integer\":\n\t\treturn \"INTEGER\"\n\tcase \"float\", \"double\", \"decimal\", \"numeric\":\n\t\tcolType := strings.ToUpper(c.ColType)\n\t\tif c.Options[\"precision\"] != nil {\n\t\t\tprecision := c.Options[\"precision\"]\n\t\t\tif c.Options[\"scale\"] != nil {\n\t\t\t\tscale := c.Options[\"scale\"]\n\t\t\t\treturn fmt.Sprintf(\"%s(%d,%d)\", colType, precision, scale)\n\t\t\t}\n\t\t\treturn fmt.Sprintf(\"%s(%d)\", colType, precision)\n\t\t}\n\n\t\treturn colType\n\tcase \"json\":\n\t\treturn \"JSON\"\n\tdefault:\n\t\treturn c.ColType\n\t}\n}\n\nfunc (p *MySQL) buildForeignKey(t fizz.Table, fk fizz.ForeignKey, onCreate bool) string {\n\trcols := []string{}\n\tfor _, c := range fk.References.Columns {\n\t\trcols = append(rcols, fmt.Sprintf(\"`%s`\", c))\n\t}\n\trefs := fmt.Sprintf(\"%s (%s)\", p.escapeIdentifier(fk.References.Table), strings.Join(rcols, \", \"))\n\ts := fmt.Sprintf(\"FOREIGN KEY (`%s`) REFERENCES %s\", fk.Column, refs)\n\n\tif onUpdate, ok := fk.Options[\"on_update\"]; ok {\n\t\ts += fmt.Sprintf(\" ON UPDATE %s\", onUpdate)\n\t}\n\n\tif onDelete, ok := fk.Options[\"on_delete\"]; ok {\n\t\ts += fmt.Sprintf(\" ON DELETE %s\", onDelete)\n\t}\n\n\tif !onCreate {\n\t\ts = fmt.Sprintf(\"ALTER TABLE %s ADD CONSTRAINT `%s` %s;\", p.escapeIdentifier(t.Name), fk.Name, s)\n\t}\n\n\treturn s\n}\n\nfunc (MySQL) escapeIdentifier(s string) string {\n\tif !strings.ContainsRune(s, '.') {\n\t\treturn fmt.Sprintf(\"`%s`\", s)\n\t}\n\tparts := strings.Split(s, \".\")\n\tfor _, p := range parts {\n\t\tp = fmt.Sprintf(\"`%s`\", p)\n\t}\n\treturn strings.Join(parts, \".\")\n}\n"
  },
  {
    "path": "translators/mysql_meta.go",
    "content": "package translators\n\nimport (\n\t\"database/sql\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/Masterminds/semver/v3\"\n\t\"github.com/gobuffalo/fizz\"\n)\n\nvar mysql57Version = semver.MustParse(\"5.7.0\")\n\ntype mysqlTableInfo struct {\n\tField   string      `db:\"Field\"`\n\tType    string      `db:\"Type\"`\n\tNull    string      `db:\"Null\"`\n\tKey     string      `db:\"Key\"`\n\tDefault interface{} `db:\"Default\"`\n\tExtra   string      `db:\"Extra\"`\n}\n\nfunc (ti mysqlTableInfo) ToColumn() fizz.Column {\n\tc := fizz.Column{\n\t\tName:    ti.Field,\n\t\tColType: ti.Type,\n\t\tPrimary: ti.Key == \"PRI\",\n\t\tOptions: map[string]interface{}{},\n\t}\n\tif strings.ToLower(ti.Null) == \"yes\" {\n\t\tc.Options[\"null\"] = true\n\t}\n\tif ti.Default != nil {\n\t\td := fmt.Sprintf(\"%s\", ti.Default)\n\t\tc.Options[\"default\"] = d\n\t}\n\treturn c\n}\n\ntype mysqlSchema struct {\n\tSchema\n}\n\nfunc (p *mysqlSchema) Version() (*semver.Version, error) {\n\tvar err error\n\n\tdb, err := sql.Open(\"mysql\", p.URL)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer db.Close()\n\n\tres, err := db.Query(\"SELECT VERSION()\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer res.Close()\n\n\tvar rawVersion string\n\tfor res.Next() {\n\t\terr = res.Scan(&rawVersion)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn semver.NewVersion(rawVersion)\n\t}\n\treturn nil, fmt.Errorf(\"could not fetch MySQL version\")\n}\n\nfunc (p *mysqlSchema) Build() error {\n\tdb, err := sql.Open(\"mysql\", p.URL)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer db.Close()\n\n\tres, err := db.Query(fmt.Sprintf(\"select TABLE_NAME as name from information_schema.TABLES where TABLE_SCHEMA = '%s'\", p.Name))\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer res.Close()\n\n\tfor res.Next() {\n\t\ttable := &fizz.Table{\n\t\t\tColumns: []fizz.Column{},\n\t\t\tIndexes: []fizz.Index{},\n\t\t}\n\t\terr = res.Scan(&table.Name)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\terr = p.buildTableData(table, db)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (p *mysqlSchema) buildTableData(table *fizz.Table, db *sql.DB) error {\n\tprag := fmt.Sprintf(\"SELECT COLUMN_NAME AS `Field`, COLUMN_TYPE AS `Type`, IS_NULLABLE AS `Null`, COLUMN_KEY AS `Key`, COLUMN_DEFAULT AS `Default`, EXTRA AS `Extra` FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '%s';\", table.Name)\n\n\tres, err := db.Query(prag)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer res.Close()\n\n\tfor res.Next() {\n\t\tti := mysqlTableInfo{}\n\t\terr = res.Scan(&ti.Field, &ti.Type, &ti.Null, &ti.Key, &ti.Default, &ti.Extra)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttable.Columns = append(table.Columns, ti.ToColumn())\n\t}\n\n\tp.schema[table.Name] = table\n\treturn nil\n}\n"
  },
  {
    "path": "translators/mysql_test.go",
    "content": "package translators_test\n\nimport (\n\t\"fmt\"\n\n\t_ \"github.com/go-sql-driver/mysql\" // Load MySQL Go driver\n\t\"github.com/gobuffalo/fizz\"\n\t\"github.com/gobuffalo/fizz/translators\"\n)\n\nvar _ fizz.Translator = (*translators.MySQL)(nil)\nvar myt = translators.NewMySQL(\"\", \"\")\n\nfunc init() {\n\tu := \"%s:%s@(%s:%s)/%s?parseTime=true&multiStatements=true&readTimeout=1s&collation=%s\"\n\tu = fmt.Sprintf(u, getEnv(\"MYSQL_USER\", \"root\"), getEnv(\"MYSQL_PASSWORD\", \"root\"), getEnv(\"MYSQL_HOST\", \"127.0.0.1\"), getEnv(\"MYSQL_PORT\", \"3306\"), \"pop_test\", \"utf8_general_ci\")\n\tmyt = translators.NewMySQL(u, \"pop_test\")\n}\n\nfunc (p *MySQLSuite) Test_MySQL_SchemaMigration() {\n\tr := p.Require()\n\tddl := `CREATE TABLE ` + \"`schema_migrations`\" + ` (\n` + \"`version`\" + ` VARCHAR (255) NOT NULL\n) ENGINE=InnoDB;\nCREATE UNIQUE INDEX ` + \"`version_idx`\" + ` ON ` + \"`schema_migrations`\" + ` (` + \"`version`\" + `);`\n\n\tres, err := myt.CreateTable(fizz.Table{\n\t\tName: \"schema_migrations\",\n\t\tColumns: []fizz.Column{\n\t\t\t{Name: \"version\", ColType: \"string\"},\n\t\t},\n\t\tIndexes: []fizz.Index{\n\t\t\t{Name: \"version_idx\", Columns: []string{\"version\"}, Unique: true},\n\t\t},\n\t})\n\tr.NoError(err)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MySQLSuite) Test_MySQL_CreateTable() {\n\tr := p.Require()\n\tddl := `CREATE TABLE ` + \"`users`\" + ` (\n` + \"`id`\" + ` INTEGER NOT NULL AUTO_INCREMENT,\nPRIMARY KEY(` + \"`id`\" + `),\n` + \"`first_name`\" + ` VARCHAR (255) NOT NULL,\n` + \"`last_name`\" + ` VARCHAR (255) NOT NULL,\n` + \"`email`\" + ` VARCHAR (20) NOT NULL,\n` + \"`permissions`\" + ` text,\n` + \"`age`\" + ` INTEGER DEFAULT 40,\n` + \"`raw`\" + ` BLOB NOT NULL,\n` + \"`json`\" + ` JSON NOT NULL,\n` + \"`float`\" + ` FLOAT NOT NULL,\n` + \"`float_noscale`\" + ` FLOAT(5) NOT NULL,\n` + \"`float_scale`\" + ` FLOAT(5,2) NOT NULL,\n` + \"`decimal`\" + ` DECIMAL(6,2) NOT NULL,\n` + \"`numeric`\" + ` NUMERIC(7,2) NOT NULL,\n` + \"`double`\" + ` DOUBLE(8,2) NOT NULL,\n` + \"`integer`\" + ` INTEGER NOT NULL,\n` + \"`bytes`\" + ` BLOB NOT NULL,\n` + \"`created_at`\" + ` DATETIME NOT NULL,\n` + \"`updated_at`\" + ` DATETIME NOT NULL\n) ENGINE=InnoDB;`\n\n\tres, err := fizz.AString(`\n\tcreate_table(\"users\") {\n\t\tt.Column(\"id\", \"integer\", {\"primary\": true})\n\t\tt.Column(\"first_name\", \"string\", {})\n\t\tt.Column(\"last_name\", \"string\", {})\n\t\tt.Column(\"email\", \"string\", {\"size\":20})\n\t\tt.Column(\"permissions\", \"text\", {\"null\": true})\n\t\tt.Column(\"age\", \"integer\", {\"null\": true, \"default\": 40})\n\t\tt.Column(\"raw\", \"blob\", {})\n\t\tt.Column(\"json\", \"json\", {})\n\t\tt.Column(\"float\", \"float\")\n\t\tt.Column(\"float_noscale\", \"float\", {\"precision\": 5})\n\t\tt.Column(\"float_scale\", \"float\", {\"precision\": 5,\"scale\":2})\n\t\tt.Column(\"decimal\", \"decimal\", {\"precision\": 6,\"scale\":2})\n\t\tt.Column(\"numeric\", \"numeric\", {\"precision\": 7,\"scale\":2})\n\t\tt.Column(\"double\", \"double\", {\"precision\": 8,\"scale\":2})\n\t\tt.Column(\"integer\", \"integer\", {})\n\t\tt.Column(\"bytes\", \"[]byte\", {})\n\t}\n\t`, myt)\n\tr.NoError(err)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MySQLSuite) Test_MySQL_CreateTable_UUID() {\n\tr := p.Require()\n\tddl := `CREATE TABLE ` + \"`users`\" + ` (\n` + \"`first_name`\" + ` VARCHAR (255) NOT NULL,\n` + \"`last_name`\" + ` VARCHAR (255) NOT NULL,\n` + \"`email`\" + ` VARCHAR (20) NOT NULL,\n` + \"`permissions`\" + ` text,\n` + \"`age`\" + ` INTEGER DEFAULT 40,\n` + \"`company_id`\" + ` char(36) NOT NULL DEFAULT 'test',\n` + \"`uuid`\" + ` char(36) NOT NULL,\nPRIMARY KEY(` + \"`uuid`\" + `),\n` + \"`created_at`\" + ` DATETIME NOT NULL,\n` + \"`updated_at`\" + ` DATETIME NOT NULL\n) ENGINE=InnoDB;`\n\n\tres, err := fizz.AString(`\n\tcreate_table(\"users\") {\n\t\tt.Column(\"first_name\", \"string\", {})\n\t\tt.Column(\"last_name\", \"string\", {})\n\t\tt.Column(\"email\", \"string\", {\"size\":20})\n\t\tt.Column(\"permissions\", \"text\", {\"null\": true})\n\t\tt.Column(\"age\", \"integer\", {\"null\": true, \"default\": 40})\n\t\tt.Column(\"company_id\", \"uuid\", {\"default_raw\": \"'test'\"})\n\t\tt.Column(\"uuid\", \"uuid\", {\"primary\": true})\n\t}\n\t`, myt)\n\tr.NoError(err)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MySQLSuite) Test_MySQL_CreateTables_WithForeignKeys() {\n\tr := p.Require()\n\tddl := `CREATE TABLE ` + \"`users`\" + ` (\n` + \"`id`\" + ` INTEGER NOT NULL AUTO_INCREMENT,\nPRIMARY KEY(` + \"`id`\" + `),\n` + \"`email`\" + ` VARCHAR (20) NOT NULL,\n` + \"`created_at`\" + ` DATETIME NOT NULL,\n` + \"`updated_at`\" + ` DATETIME NOT NULL\n) ENGINE=InnoDB;\nCREATE TABLE ` + \"`profiles`\" + ` (\n` + \"`id`\" + ` INTEGER NOT NULL AUTO_INCREMENT,\nPRIMARY KEY(` + \"`id`\" + `),\n` + \"`user_id`\" + ` INTEGER NOT NULL,\n` + \"`first_name`\" + ` VARCHAR (255) NOT NULL,\n` + \"`last_name`\" + ` VARCHAR (255) NOT NULL,\n` + \"`created_at`\" + ` DATETIME NOT NULL,\n` + \"`updated_at`\" + ` DATETIME NOT NULL,\nFOREIGN KEY (` + \"`user_id`\" + `) REFERENCES ` + \"`users`\" + ` (` + \"`id`\" + `)\n) ENGINE=InnoDB;`\n\n\tres, err := fizz.AString(`\n\tcreate_table(\"users\") {\n\t\tt.Column(\"id\", \"INT\", {\"primary\": true})\n\t\tt.Column(\"email\", \"string\", {\"size\":20})\n\t}\n\tcreate_table(\"profiles\") {\n\t\tt.Column(\"id\", \"INT\", {\"primary\": true})\n\t\tt.Column(\"user_id\", \"INT\", {})\n\t\tt.Column(\"first_name\", \"string\", {})\n\t\tt.Column(\"last_name\", \"string\", {})\n\t\tt.ForeignKey(\"user_id\", {\"users\": [\"id\"]}, {})\n\t}\n\t`, myt)\n\tr.NoError(err)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MySQLSuite) Test_MySQL_CreateTables_WithVariousInt() {\n\tr := p.Require()\n\tddl := `CREATE TABLE ` + \"`manyusers`\" + ` (\n` + \"`id`\" + ` bigint NOT NULL AUTO_INCREMENT,\n` + `PRIMARY KEY(` + \"`id`\" + `),\n` + \"`created_at`\" + ` DATETIME NOT NULL,\n` + \"`updated_at`\" + ` DATETIME NOT NULL\n) ENGINE=InnoDB;\n` + `CREATE TABLE ` + \"`someusers`\" + ` (\n` + \"`id`\" + ` smallint NOT NULL AUTO_INCREMENT,\n` + `PRIMARY KEY(` + \"`id`\" + `),\n` + \"`created_at`\" + ` DATETIME NOT NULL,\n` + \"`updated_at`\" + ` DATETIME NOT NULL\n) ENGINE=InnoDB;`\n\n\tres, err := fizz.AString(`\n\tcreate_table(\"manyusers\") {\n\t\tt.Column(\"id\", \"bigint\", {\"primary\": true})\n\t}\n\tcreate_table(\"someusers\") {\n\t\tt.Column(\"id\", \"smallint\", {\"primary\": true})\n\t}\n\t`, myt)\n\tr.NoError(err)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MySQLSuite) Test_MySQL_CreateTables_WithCompositePrimaryKey() {\n\tr := p.Require()\n\tddl := `CREATE TABLE ` + \"`user_profiles`\" + ` (\n` + \"`user_id`\" + ` INTEGER NOT NULL,\n` + \"`profile_id`\" + ` INTEGER NOT NULL,\n` + \"`created_at`\" + ` DATETIME NOT NULL,\n` + \"`updated_at`\" + ` DATETIME NOT NULL,\nPRIMARY KEY(` + \"`user_id`\" + `, ` + \"`profile_id`\" + `)\n) ENGINE=InnoDB;`\n\n\tres, _ := fizz.AString(`\n\tcreate_table(\"user_profiles\") {\n\t\tt.Column(\"user_id\", \"INT\")\n\t\tt.Column(\"profile_id\", \"INT\")\n\t\tt.PrimaryKey(\"user_id\", \"profile_id\")\n\t}\n\t`, myt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MySQLSuite) Test_MySQL_DropTable() {\n\tr := p.Require()\n\n\tddl := `DROP TABLE ` + \"`users`\" + `;`\n\n\tres, err := fizz.AString(`drop_table(\"users\")`, myt)\n\tr.NoError(err)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MySQLSuite) Test_MySQL_RenameTable() {\n\tr := p.Require()\n\n\tddl := `ALTER TABLE ` + \"`users`\" + ` RENAME TO ` + \"`people`\" + `;`\n\n\tres, err := fizz.AString(`rename_table(\"users\", \"people\")`, myt)\n\tr.NoError(err)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MySQLSuite) Test_MySQL_RenameTable_NotEnoughValues() {\n\tr := p.Require()\n\n\t_, err := myt.RenameTable([]fizz.Table{})\n\tr.Error(err)\n}\n\nfunc (p *MySQLSuite) Test_MySQL_ChangeColumn() {\n\tr := p.Require()\n\tddl := `ALTER TABLE ` + \"`users`\" + ` MODIFY ` + \"`mycolumn`\" + ` VARCHAR (50) NOT NULL DEFAULT 'foo';`\n\n\tres, err := fizz.AString(`change_column(\"users\", \"mycolumn\", \"string\", {\"default\": \"foo\", \"size\": 50})`, myt)\n\tr.NoError(err)\n\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MySQLSuite) Test_MySQL_AddColumn() {\n\tr := p.Require()\n\tddl := `ALTER TABLE ` + \"`users`\" + ` ADD COLUMN ` + \"`mycolumn`\" + ` VARCHAR (50) NOT NULL DEFAULT 'foo';`\n\n\tres, err := fizz.AString(`add_column(\"users\", \"mycolumn\", \"string\", {\"default\": \"foo\", \"size\": 50})`, myt)\n\tr.NoError(err)\n\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MySQLSuite) Test_MySQL_AddColumnAfter() {\n\tr := p.Require()\n\tddl := `ALTER TABLE ` + \"`users`\" + ` ADD COLUMN ` + \"`mycolumn`\" + ` VARCHAR (50) NOT NULL DEFAULT 'foo' AFTER ` + \"`created_at`\" + `;`\n\n\tres, err := fizz.AString(`add_column(\"users\", \"mycolumn\", \"string\", {\"default\": \"foo\", \"size\": 50, \"after\":\"created_at\"})`, myt)\n\tr.NoError(err)\n\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MySQLSuite) Test_MySQL_AddColumnFirst() {\n\tr := p.Require()\n\tddl := `ALTER TABLE ` + \"`users`\" + ` ADD COLUMN ` + \"`mycolumn`\" + ` VARCHAR (50) NOT NULL DEFAULT 'foo' FIRST;`\n\n\tres, err := fizz.AString(`add_column(\"users\", \"mycolumn\", \"string\", {\"default\": \"foo\", \"size\": 50, \"first\":true})`, myt)\n\tr.NoError(err)\n\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MySQLSuite) Test_MySQL_DropColumn() {\n\tr := p.Require()\n\tddl := `ALTER TABLE ` + \"`users`\" + ` DROP COLUMN ` + \"`mycolumn`\" + `;`\n\n\tres, err := fizz.AString(`drop_column(\"users\", \"mycolumn\")`, myt)\n\tr.NoError(err)\n\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MySQLSuite) Test_MySQL_RenameColumn() {\n\tr := p.Require()\n\tddl := `ALTER TABLE ` + \"`users`\" + ` CHANGE ` + \"`email`\" + ` ` + \"`email_address`\" + ` varchar(50) NOT NULL DEFAULT 'foo@example.com';`\n\n\tres, err := fizz.AString(`rename_column(\"users\", \"email\", \"email_address\")`, myt)\n\tr.NoError(err)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MySQLSuite) Test_MySQL_AddIndex() {\n\tr := p.Require()\n\tddl := `CREATE INDEX ` + \"`users_email_idx`\" + ` ON ` + \"`users`\" + ` (` + \"`email`\" + `);`\n\n\tres, err := fizz.AString(`add_index(\"users\", \"email\", {})`, myt)\n\tr.NoError(err)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MySQLSuite) Test_MySQL_AddIndex_Unique() {\n\tr := p.Require()\n\tddl := `CREATE UNIQUE INDEX ` + \"`users_email_idx`\" + ` ON ` + \"`users`\" + ` (` + \"`email`\" + `);`\n\n\tres, err := fizz.AString(`add_index(\"users\", \"email\", {\"unique\": true})`, myt)\n\tr.NoError(err)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MySQLSuite) Test_MySQL_AddIndex_MultiColumn() {\n\tr := p.Require()\n\tddl := `CREATE INDEX ` + \"`users_id_email_idx`\" + ` ON ` + \"`users`\" + ` (` + \"`id`\" + `, ` + \"`email`\" + `);`\n\n\tres, err := fizz.AString(`add_index(\"users\", [\"id\", \"email\"], {})`, myt)\n\tr.NoError(err)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MySQLSuite) Test_MySQL_AddIndex_CustomName() {\n\tr := p.Require()\n\tddl := `CREATE INDEX ` + \"`email_index`\" + ` ON ` + \"`users`\" + ` (` + \"`email`\" + `);`\n\n\tres, err := fizz.AString(`add_index(\"users\", \"email\", {\"name\": \"email_index\"})`, myt)\n\tr.NoError(err)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MySQLSuite) Test_MySQL_DropIndex() {\n\tr := p.Require()\n\tddl := `DROP INDEX ` + \"`email_idx`\" + ` ON ` + \"`users`\" + `;`\n\n\tres, err := fizz.AString(`drop_index(\"users\", \"email_idx\")`, myt)\n\tr.NoError(err)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MySQLSuite) Test_MySQL_RenameIndex() {\n\tr := p.Require()\n\n\tddl := `ALTER TABLE ` + \"`users`\" + ` RENAME INDEX ` + \"`email_idx`\" + ` TO ` + \"`email_address_idx`\" + `;`\n\n\tres, err := fizz.AString(`rename_index(\"users\", \"email_idx\", \"email_address_idx\")`, myt)\n\tr.NoError(err)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MySQLSuite) Test_MySQL_AddForeignKey() {\n\tr := p.Require()\n\tddl := `ALTER TABLE ` + \"`profiles`\" + ` ADD CONSTRAINT ` + \"`profiles_users_id_fk`\" + ` FOREIGN KEY (` + \"`user_id`\" + `) REFERENCES ` + \"`users`\" + ` (` + \"`id`\" + `);`\n\n\tres, err := fizz.AString(`add_foreign_key(\"profiles\", \"user_id\", {\"users\": [\"id\"]}, {})`, myt)\n\tr.NoError(err)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *MySQLSuite) Test_MySQL_DropForeignKey() {\n\tr := p.Require()\n\tddl := `ALTER TABLE ` + \"`profiles`\" + ` DROP FOREIGN KEY ` + \"`profiles_users_id_fk`\" + `;`\n\n\tres, err := fizz.AString(`drop_foreign_key(\"profiles\", \"profiles_users_id_fk\", {})`, myt)\n\tr.NoError(err)\n\tr.Equal(ddl, res)\n}\n"
  },
  {
    "path": "translators/postgres.go",
    "content": "package translators\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/gobuffalo/fizz\"\n)\n\ntype Postgres struct {\n}\n\nfunc NewPostgres() *Postgres {\n\treturn &Postgres{}\n}\n\nfunc (Postgres) Name() string {\n\treturn \"postgres\"\n}\n\nfunc (p *Postgres) CreateTable(t fizz.Table) (string, error) {\n\tsql := []string{}\n\tcols := []string{}\n\tvar s string\n\tfor _, c := range t.Columns {\n\t\tif c.Primary {\n\t\t\tswitch c.ColType {\n\t\t\tcase \"string\", \"uuid\": // make sure that we don't fall into default\n\t\t\tcase \"integer\", \"INT\", \"int\":\n\t\t\t\tc.ColType = \"SERIAL\"\n\t\t\tcase \"bigint\", \"BIGINT\":\n\t\t\t\tc.ColType = \"BIGSERIAL\"\n\t\t\tdefault:\n\t\t\t\treturn \"\", fmt.Errorf(\"can not use %s as a primary key\", c.ColType)\n\t\t\t}\n\t\t}\n\t\tcols = append(cols, p.buildAddColumn(c))\n\t\tif c.Primary {\n\t\t\tcols = append(cols, fmt.Sprintf(`PRIMARY KEY(\"%s\")`, c.Name))\n\t\t}\n\t}\n\n\tfor _, fk := range t.ForeignKeys {\n\t\tcols = append(cols, p.buildForeignKey(t, fk, true))\n\t}\n\n\tprimaryKeys := t.PrimaryKeys()\n\tif len(primaryKeys) > 1 {\n\t\tpks := make([]string, len(primaryKeys))\n\t\tfor i, pk := range primaryKeys {\n\t\t\tpks[i] = fmt.Sprintf(\"\\\"%s\\\"\", pk)\n\t\t}\n\t\tcols = append(cols, fmt.Sprintf(\"PRIMARY KEY(%s)\", strings.Join(pks, \", \")))\n\t}\n\n\ts = fmt.Sprintf(\"CREATE TABLE \\\"%s\\\" (\\n%s\\n);\", t.Name, strings.Join(cols, \",\\n\"))\n\tsql = append(sql, s)\n\n\tfor _, i := range t.Indexes {\n\t\ts, err := p.AddIndex(fizz.Table{\n\t\t\tName:    t.Name,\n\t\t\tIndexes: []fizz.Index{i},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tsql = append(sql, s)\n\t}\n\n\treturn strings.Join(sql, \"\\n\"), nil\n}\n\nfunc (p *Postgres) DropTable(t fizz.Table) (string, error) {\n\treturn fmt.Sprintf(\"DROP TABLE \\\"%s\\\";\", t.Name), nil\n}\n\nfunc (p *Postgres) RenameTable(t []fizz.Table) (string, error) {\n\tif len(t) < 2 {\n\t\treturn \"\", fmt.Errorf(\"not enough table names supplied\")\n\t}\n\treturn fmt.Sprintf(\"ALTER TABLE \\\"%s\\\" RENAME TO \\\"%s\\\";\", t[0].Name, t[1].Name), nil\n}\n\nfunc (p *Postgres) ChangeColumn(t fizz.Table) (string, error) {\n\tif len(t.Columns) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough columns supplied\")\n\t}\n\tc := t.Columns[0]\n\ts := fmt.Sprintf(\"ALTER TABLE \\\"%s\\\" ALTER COLUMN %s;\", t.Name, p.buildChangeColumn(c))\n\treturn s, nil\n}\n\nfunc (p *Postgres) AddColumn(t fizz.Table) (string, error) {\n\tif len(t.Columns) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough columns supplied\")\n\t}\n\tc := t.Columns[0]\n\ts := fmt.Sprintf(\"ALTER TABLE \\\"%s\\\" ADD COLUMN %s;\", t.Name, p.buildAddColumn(c))\n\treturn s, nil\n}\n\nfunc (p *Postgres) DropColumn(t fizz.Table) (string, error) {\n\tif len(t.Columns) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough columns supplied\")\n\t}\n\tc := t.Columns[0]\n\treturn fmt.Sprintf(\"ALTER TABLE \\\"%s\\\" DROP COLUMN \\\"%s\\\";\", t.Name, c.Name), nil\n}\n\nfunc (p *Postgres) RenameColumn(t fizz.Table) (string, error) {\n\tif len(t.Columns) < 2 {\n\t\treturn \"\", fmt.Errorf(\"not enough columns supplied\")\n\t}\n\toc := t.Columns[0]\n\tnc := t.Columns[1]\n\ts := fmt.Sprintf(\"ALTER TABLE \\\"%s\\\" RENAME COLUMN \\\"%s\\\" TO \\\"%s\\\";\", t.Name, oc.Name, nc.Name)\n\treturn s, nil\n}\n\nfunc (p *Postgres) AddIndex(t fizz.Table) (string, error) {\n\tif len(t.Indexes) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough indexes supplied\")\n\t}\n\ti := t.Indexes[0]\n\ts := fmt.Sprintf(\"CREATE INDEX \\\"%s\\\" ON \\\"%s\\\" (%s);\", i.Name, t.Name, strings.Join(i.Columns, \", \"))\n\tif i.Unique {\n\t\ts = strings.Replace(s, \"CREATE\", \"CREATE UNIQUE\", 1)\n\t}\n\treturn s, nil\n}\n\nfunc (p *Postgres) DropIndex(t fizz.Table) (string, error) {\n\tif len(t.Indexes) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough indexes supplied\")\n\t}\n\ti := t.Indexes[0]\n\treturn fmt.Sprintf(\"DROP INDEX \\\"%s\\\";\", i.Name), nil\n}\n\nfunc (p *Postgres) RenameIndex(t fizz.Table) (string, error) {\n\tix := t.Indexes\n\tif len(ix) < 2 {\n\t\treturn \"\", fmt.Errorf(\"not enough indexes supplied\")\n\t}\n\toi := ix[0]\n\tni := ix[1]\n\treturn fmt.Sprintf(\"ALTER INDEX \\\"%s\\\" RENAME TO \\\"%s\\\";\", oi.Name, ni.Name), nil\n}\n\nfunc (p *Postgres) AddForeignKey(t fizz.Table) (string, error) {\n\tif len(t.ForeignKeys) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough foreign keys supplied\")\n\t}\n\n\treturn p.buildForeignKey(t, t.ForeignKeys[0], false), nil\n}\n\nfunc (p *Postgres) DropForeignKey(t fizz.Table) (string, error) {\n\tif len(t.ForeignKeys) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough foreign keys supplied\")\n\t}\n\n\tfk := t.ForeignKeys[0]\n\n\tvar ifExists string\n\tif v, ok := fk.Options[\"if_exists\"]; ok && v.(bool) {\n\t\tifExists = \"IF EXISTS \"\n\t}\n\n\ts := fmt.Sprintf(\"ALTER TABLE %s DROP CONSTRAINT %s\\\"%s\\\";\", p.escapeIdentifier(t.Name), ifExists, fk.Name)\n\treturn s, nil\n}\n\nfunc (p *Postgres) buildAddColumn(c fizz.Column) string {\n\ts := fmt.Sprintf(\"\\\"%s\\\" %s\", c.Name, p.colType(c))\n\n\tif c.Options[\"null\"] == nil || c.Primary {\n\t\ts = fmt.Sprintf(\"%s NOT NULL\", s)\n\t}\n\tif c.Options[\"default\"] != nil {\n\t\ts = fmt.Sprintf(\"%s DEFAULT '%v'\", s, c.Options[\"default\"])\n\t}\n\tif c.Options[\"default_raw\"] != nil {\n\t\ts = fmt.Sprintf(\"%s DEFAULT %s\", s, c.Options[\"default_raw\"])\n\t}\n\n\treturn s\n}\n\nfunc (p *Postgres) buildChangeColumn(c fizz.Column) string {\n\ts := fmt.Sprintf(\"\\\"%s\\\" TYPE %s\", c.Name, p.colType(c))\n\n\tvar sets []string\n\tif c.Options[\"null\"] == nil {\n\t\tsets = append(sets, fmt.Sprintf(\"ALTER COLUMN \\\"%s\\\" SET NOT NULL\", c.Name))\n\t} else {\n\t\tsets = append(sets, fmt.Sprintf(\"ALTER COLUMN \\\"%s\\\" DROP NOT NULL\", c.Name))\n\t}\n\tif c.Options[\"default\"] != nil {\n\t\tsets = append(sets, fmt.Sprintf(\"ALTER COLUMN \\\"%s\\\" SET DEFAULT '%v'\", c.Name, c.Options[\"default\"]))\n\t}\n\tif c.Options[\"default_raw\"] != nil {\n\t\tsets = append(sets, fmt.Sprintf(\"ALTER COLUMN \\\"%s\\\" SET DEFAULT %s\", c.Name, c.Options[\"default_raw\"]))\n\t}\n\tif len(sets) > 0 {\n\t\ts += \", \" + strings.Join(sets, \", \")\n\t}\n\n\treturn s\n}\n\nfunc (p *Postgres) colType(c fizz.Column) string {\n\tswitch c.ColType {\n\tcase \"string\":\n\t\ts := \"255\"\n\t\tif c.Options[\"size\"] != nil {\n\t\t\ts = fmt.Sprintf(\"%d\", c.Options[\"size\"])\n\t\t}\n\t\treturn fmt.Sprintf(\"VARCHAR (%s)\", s)\n\tcase \"uuid\":\n\t\treturn \"UUID\"\n\tcase \"time\", \"datetime\":\n\t\treturn \"timestamptz\"\n\tcase \"blob\", \"[]byte\":\n\t\treturn \"bytea\"\n\tcase \"float\", \"decimal\":\n\t\tif c.Options[\"precision\"] != nil {\n\t\t\tprecision := c.Options[\"precision\"]\n\t\t\tif c.Options[\"scale\"] != nil {\n\t\t\t\tscale := c.Options[\"scale\"]\n\t\t\t\treturn fmt.Sprintf(\"DECIMAL(%d,%d)\", precision, scale)\n\t\t\t}\n\t\t\treturn fmt.Sprintf(\"DECIMAL(%d)\", precision)\n\t\t}\n\n\t\treturn \"DECIMAL\"\n\tcase \"[]string\":\n\t\treturn \"varchar[]\"\n\tcase \"[]float\":\n\t\treturn \"decimal[]\"\n\tcase \"[]int\":\n\t\treturn \"integer[]\"\n\tcase \"json\":\n\t\treturn \"jsonb\"\n\tdefault:\n\t\treturn c.ColType\n\t}\n}\n\nfunc (p *Postgres) buildForeignKey(t fizz.Table, fk fizz.ForeignKey, onCreate bool) string {\n\trcols := []string{}\n\tfor _, c := range fk.References.Columns {\n\t\trcols = append(rcols, fmt.Sprintf(\"\\\"%s\\\"\", c))\n\t}\n\trefs := fmt.Sprintf(\"%s (%s)\", p.escapeIdentifier(fk.References.Table), strings.Join(rcols, \", \"))\n\ts := fmt.Sprintf(\"FOREIGN KEY (\\\"%s\\\") REFERENCES %s\", fk.Column, refs)\n\n\tif onUpdate, ok := fk.Options[\"on_update\"]; ok {\n\t\ts += fmt.Sprintf(\" ON UPDATE %s\", onUpdate)\n\t}\n\n\tif onDelete, ok := fk.Options[\"on_delete\"]; ok {\n\t\ts += fmt.Sprintf(\" ON DELETE %s\", onDelete)\n\t}\n\n\tif !onCreate {\n\t\ts = fmt.Sprintf(\"ALTER TABLE %s ADD CONSTRAINT \\\"%s\\\" %s;\", p.escapeIdentifier(t.Name), fk.Name, s)\n\t}\n\n\treturn s\n}\n\nfunc (Postgres) escapeIdentifier(s string) string {\n\tif !strings.ContainsRune(s, '.') {\n\t\treturn fmt.Sprintf(\"\\\"%s\\\"\", s)\n\t}\n\tparts := strings.Split(s, \".\")\n\tfor _, p := range parts {\n\t\tp = fmt.Sprintf(\"\\\"%s\\\"\", p)\n\t}\n\treturn strings.Join(parts, \".\")\n}\n"
  },
  {
    "path": "translators/postgres_test.go",
    "content": "package translators_test\n\nimport (\n\t\"github.com/gobuffalo/fizz\"\n\t\"github.com/gobuffalo/fizz/translators\"\n)\n\nvar _ fizz.Translator = (*translators.Postgres)(nil)\nvar pgt = translators.NewPostgres()\n\nfunc (p *PostgreSQLSuite) Test_Postgres_CreateTable() {\n\tr := p.Require()\n\tddl := `CREATE TABLE \"users\" (\n\"id\" SERIAL NOT NULL,\nPRIMARY KEY(\"id\"),\n\"first_name\" VARCHAR (255) NOT NULL,\n\"last_name\" VARCHAR (255) NOT NULL,\n\"email\" VARCHAR (20) NOT NULL,\n\"permissions\" jsonb,\n\"age\" integer DEFAULT '40',\n\"raw\" bytea NOT NULL,\n\"company_id\" UUID NOT NULL DEFAULT uuid_generate_v1(),\n\"created_at\" timestamp NOT NULL,\n\"updated_at\" timestamp NOT NULL\n);`\n\n\tres, _ := fizz.AString(`\n\tcreate_table(\"users\") {\n\t\tt.Column(\"id\", \"integer\", {\"primary\": true})\n\t\tt.Column(\"first_name\", \"string\", {})\n\t\tt.Column(\"last_name\", \"string\", {})\n\t\tt.Column(\"email\", \"string\", {\"size\":20})\n\t\tt.Column(\"permissions\", \"jsonb\", {\"null\": true})\n\t\tt.Column(\"age\", \"integer\", {\"null\": true, \"default\": 40})\n\t\tt.Column(\"raw\", \"blob\", {})\n\t\tt.Column(\"company_id\", \"uuid\", {\"default_raw\": \"uuid_generate_v1()\"})\n\t}\n\t`, pgt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *PostgreSQLSuite) Test_Postgres_CreateTable_UUID() {\n\tr := p.Require()\n\tddl := `CREATE TABLE \"users\" (\n\"first_name\" VARCHAR (255) NOT NULL,\n\"last_name\" VARCHAR (255) NOT NULL,\n\"email\" VARCHAR (20) NOT NULL,\n\"permissions\" jsonb,\n\"age\" integer DEFAULT '40',\n\"integer\" integer NOT NULL,\n\"float\" DECIMAL NOT NULL,\n\"bytes\" bytea NOT NULL,\n\"strings\" varchar[] NOT NULL,\n\"floats\" decimal[] NOT NULL,\n\"ints\" integer[] NOT NULL,\n\"jason\" jsonb NOT NULL,\n\"mydecimal\" DECIMAL NOT NULL,\n\"mydecimal2\" DECIMAL(5,2) NOT NULL,\n\"uuid\" UUID NOT NULL,\nPRIMARY KEY(\"uuid\"),\n\"created_at\" timestamp NOT NULL,\n\"updated_at\" timestamp NOT NULL\n);`\n\n\tres, _ := fizz.AString(`\n\tcreate_table(\"users\") {\n\t\tt.Column(\"first_name\", \"string\", {})\n\t\tt.Column(\"last_name\", \"string\", {})\n\t\tt.Column(\"email\", \"string\", {\"size\":20})\n\t\tt.Column(\"permissions\", \"jsonb\", {\"null\": true})\n\t\tt.Column(\"age\", \"integer\", {\"null\": true, \"default\": 40})\n\t\tt.Column(\"integer\", \"integer\", {})\n\t\tt.Column(\"float\", \"float\", {})\n\t\tt.Column(\"bytes\", \"[]byte\", {})\n\t\tt.Column(\"strings\", \"[]string\", {})\n\t\tt.Column(\"floats\", \"[]float\", {})\n\t\tt.Column(\"ints\", \"[]int\", {})\n\t\tt.Column(\"jason\", \"json\", {})\n\t\tt.Column(\"mydecimal\", \"decimal\", {})\n\t\tt.Column(\"mydecimal2\", \"decimal\", {\"precision\": 5, \"scale\": 2})\n\t\tt.Column(\"uuid\", \"uuid\", {\"primary\": true})\n\t}\n\t`, pgt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *PostgreSQLSuite) Test_Postgres_CreateTable_UUID_With_Default() {\n\tr := p.Require()\n\tddl := `CREATE TABLE \"users\" (\n\"uuid\" UUID NOT NULL DEFAULT uuid_generate_v4(),\nPRIMARY KEY(\"uuid\")\n);`\n\n\tres, _ := fizz.AString(`\n\tcreate_table(\"users\") {\n\t\tt.Column(\"uuid\", \"uuid\", {\"primary\": true, \"default_raw\": \"uuid_generate_v4()\"})\n\t\tt.DisableTimestamps()\n\t}\n\t`, pgt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *PostgreSQLSuite) Test_Postgres_CreateTable_Cant_Set_PK_To_Nullable() {\n\tr := p.Require()\n\tddl := `CREATE TABLE \"users\" (\n\"uuid\" UUID NOT NULL,\nPRIMARY KEY(\"uuid\")\n);`\n\n\tres, _ := fizz.AString(`\n\tcreate_table(\"users\") {\n\t\tt.Column(\"uuid\", \"uuid\", {\"primary\": true, \"null\": true})\n\t\tt.DisableTimestamps()\n\t}\n\t`, pgt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *PostgreSQLSuite) Test_Postgres_CreateTables_WithForeignKeys() {\n\tr := p.Require()\n\tddl := `CREATE TABLE \"users\" (\n\"id\" SERIAL NOT NULL,\nPRIMARY KEY(\"id\"),\n\"email\" VARCHAR (20) NOT NULL,\n\"created_at\" timestamp NOT NULL,\n\"updated_at\" timestamp NOT NULL\n);\nCREATE TABLE \"profiles\" (\n\"id\" SERIAL NOT NULL,\nPRIMARY KEY(\"id\"),\n\"user_id\" INT NOT NULL,\n\"first_name\" VARCHAR (255) NOT NULL,\n\"last_name\" VARCHAR (255) NOT NULL,\n\"created_at\" timestamp NOT NULL,\n\"updated_at\" timestamp NOT NULL,\nFOREIGN KEY (\"user_id\") REFERENCES \"users\" (\"id\")\n);`\n\n\tres, err := fizz.AString(`\n\tcreate_table(\"users\") {\n\t\tt.Column(\"id\", \"INT\", {\"primary\": true})\n\t\tt.Column(\"email\", \"string\", {\"size\":20})\n\t}\n\tcreate_table(\"profiles\") {\n\t\tt.Column(\"id\", \"INT\", {\"primary\": true})\n\t\tt.Column(\"user_id\", \"INT\", {})\n\t\tt.Column(\"first_name\", \"string\", {})\n\t\tt.Column(\"last_name\", \"string\", {})\n\t\tt.ForeignKey(\"user_id\", {\"users\": [\"id\"]}, {})\n\t}\n\t`, pgt)\n\tr.NoError(err)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *PostgreSQLSuite) Test_Postgres_CreateTables_WithCompositePrimaryKey() {\n\tr := p.Require()\n\tddl := `CREATE TABLE \"user_profiles\" (\n\"user_id\" INT NOT NULL,\n\"profile_id\" INT NOT NULL,\n\"created_at\" timestamp NOT NULL,\n\"updated_at\" timestamp NOT NULL,\nPRIMARY KEY(\"user_id\", \"profile_id\")\n);`\n\n\tres, _ := fizz.AString(`\n\tcreate_table(\"user_profiles\") {\n\t\tt.Column(\"user_id\", \"INT\")\n\t\tt.Column(\"profile_id\", \"INT\")\n\t\tt.PrimaryKey(\"user_id\", \"profile_id\")\n\t}\n\t`, pgt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *PostgreSQLSuite) Test_Postgres_DropTable() {\n\tr := p.Require()\n\n\tddl := `DROP TABLE \"users\";`\n\n\tres, _ := fizz.AString(`drop_table(\"users\")`, pgt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *PostgreSQLSuite) Test_Postgres_RenameTable() {\n\tr := p.Require()\n\n\tddl := `ALTER TABLE \"users\" RENAME TO \"people\";`\n\n\tres, _ := fizz.AString(`rename_table(\"users\", \"people\")`, pgt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *PostgreSQLSuite) Test_Postgres_RenameTable_NotEnoughValues() {\n\tr := p.Require()\n\n\t_, err := pgt.RenameTable([]fizz.Table{})\n\tr.Error(err)\n}\n\nfunc (p *PostgreSQLSuite) Test_Postgres_ChangeColumn() {\n\tr := p.Require()\n\tddl := `ALTER TABLE \"mytable\" ALTER COLUMN \"mycolumn\" TYPE VARCHAR (50), ALTER COLUMN \"mycolumn\" SET NOT NULL, ALTER COLUMN \"mycolumn\" SET DEFAULT 'foo';`\n\n\tres, _ := fizz.AString(`change_column(\"mytable\", \"mycolumn\", \"string\", {\"default\": \"foo\", \"size\": 50})`, pgt)\n\n\tr.Equal(ddl, res)\n}\n\nfunc (p *PostgreSQLSuite) Test_Postgres_AddColumn() {\n\tr := p.Require()\n\tddl := `ALTER TABLE \"mytable\" ADD COLUMN \"mycolumn\" VARCHAR (50) NOT NULL DEFAULT 'foo';`\n\n\tres, _ := fizz.AString(`add_column(\"mytable\", \"mycolumn\", \"string\", {\"default\": \"foo\", \"size\": 50})`, pgt)\n\n\tr.Equal(ddl, res)\n}\n\nfunc (p *PostgreSQLSuite) Test_Postgres_DropColumn() {\n\tr := p.Require()\n\tddl := `ALTER TABLE \"table_name\" DROP COLUMN \"column_name\";`\n\n\tres, _ := fizz.AString(`drop_column(\"table_name\", \"column_name\")`, pgt)\n\n\tr.Equal(ddl, res)\n}\n\nfunc (p *PostgreSQLSuite) Test_Postgres_RenameColumn() {\n\tr := p.Require()\n\tddl := `ALTER TABLE \"table_name\" RENAME COLUMN \"old_column\" TO \"new_column\";`\n\n\tres, _ := fizz.AString(`rename_column(\"table_name\", \"old_column\", \"new_column\")`, pgt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *PostgreSQLSuite) Test_Postgres_AddIndex() {\n\tr := p.Require()\n\tddl := `CREATE INDEX \"table_name_column_name_idx\" ON \"table_name\" (column_name);`\n\n\tres, _ := fizz.AString(`add_index(\"table_name\", \"column_name\", {})`, pgt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *PostgreSQLSuite) Test_Postgres_AddIndex_Unique() {\n\tr := p.Require()\n\tddl := `CREATE UNIQUE INDEX \"table_name_column_name_idx\" ON \"table_name\" (column_name);`\n\n\tres, _ := fizz.AString(`add_index(\"table_name\", \"column_name\", {\"unique\": true})`, pgt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *PostgreSQLSuite) Test_Postgres_AddIndex_MultiColumn() {\n\tr := p.Require()\n\tddl := `CREATE INDEX \"table_name_col1_col2_col3_idx\" ON \"table_name\" (col1, col2, col3);`\n\n\tres, _ := fizz.AString(`add_index(\"table_name\", [\"col1\", \"col2\", \"col3\"], {})`, pgt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *PostgreSQLSuite) Test_Postgres_AddIndex_CustomName() {\n\tr := p.Require()\n\tddl := `CREATE INDEX \"custom_name\" ON \"table_name\" (column_name);`\n\n\tres, _ := fizz.AString(`add_index(\"table_name\", \"column_name\", {\"name\": \"custom_name\"})`, pgt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *PostgreSQLSuite) Test_Postgres_DropIndex() {\n\tr := p.Require()\n\tddl := `DROP INDEX \"my_idx\";`\n\n\tres, _ := fizz.AString(`drop_index(\"users\", \"my_idx\")`, pgt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *PostgreSQLSuite) Test_Postgres_RenameIndex() {\n\tr := p.Require()\n\n\tddl := `ALTER INDEX \"old_ix\" RENAME TO \"new_ix\";`\n\n\tres, _ := fizz.AString(`rename_index(\"table\", \"old_ix\", \"new_ix\")`, pgt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *PostgreSQLSuite) Test_Postgres_AddForeignKey() {\n\tr := p.Require()\n\n\tddl := `ALTER TABLE \"profiles\" ADD CONSTRAINT \"profiles_users_id_fk\" FOREIGN KEY (\"user_id\") REFERENCES \"users\" (\"id\");`\n\n\tres, _ := fizz.AString(`add_foreign_key(\"profiles\", \"user_id\", {\"users\": [\"id\"]}, {})`, pgt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *PostgreSQLSuite) Test_Postgres_DropForeignKey() {\n\tr := p.Require()\n\n\tddl := `ALTER TABLE \"profiles\" DROP CONSTRAINT \"profiles_users_id_fk\";`\n\n\tres, _ := fizz.AString(`drop_foreign_key(\"profiles\", \"profiles_users_id_fk\", {})`, pgt)\n\tr.Equal(ddl, res)\n}\n"
  },
  {
    "path": "translators/schema.go",
    "content": "package translators\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/gobuffalo/fizz\"\n)\n\ntype SchemaQuery interface {\n\tReplaceSchema(map[string]*fizz.Table)\n\tBuild() error\n\tTableInfo(string) (*fizz.Table, error)\n\tReplaceColumn(table string, oldColumn string, newColumn fizz.Column) error\n\tColumnInfo(table string, column string) (*fizz.Column, error)\n\tIndexInfo(table string, idx string) (*fizz.Index, error)\n\tDelete(string)\n\tSetTable(*fizz.Table)\n\tDeleteColumn(string, string)\n}\n\ntype Schema struct {\n\tschema  map[string]*fizz.Table\n\tBuilder SchemaQuery\n\tName    string\n\tURL     string\n}\n\nfunc CreateSchema(name string, url string, schema map[string]*fizz.Table) Schema {\n\treturn Schema{\n\t\tName:   name,\n\t\tURL:    url,\n\t\tschema: schema,\n\t}\n}\n\nfunc (s *Schema) ReplaceSchema(newSchema map[string]*fizz.Table) {\n\ts.schema = newSchema\n}\n\nfunc (s *Schema) Build() error {\n\treturn fmt.Errorf(\"build not implemented for this translator\")\n}\n\nfunc (s *Schema) TableInfo(table string) (*fizz.Table, error) {\n\tif ti, ok := s.schema[table]; ok {\n\t\treturn ti, nil\n\t}\n\n\tif s.Builder != nil {\n\t\terr := s.Builder.Build()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t} else {\n\t\terr := s.Build()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tif ti, ok := s.schema[table]; ok {\n\t\treturn ti, nil\n\t}\n\treturn nil, fmt.Errorf(\"could not find table data for %s\", table)\n}\n\nfunc (s *Schema) ReplaceColumn(table string, oldColumn string, newColumn fizz.Column) error {\n\ttableInfo, err := s.TableInfo(table)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor i, col := range tableInfo.Columns {\n\t\tif strings.ToLower(strings.TrimSpace(col.Name)) == strings.ToLower(strings.TrimSpace(oldColumn)) {\n\t\t\ttableInfo.Columns[i] = newColumn\n\t\t\treturn nil\n\t\t}\n\t}\n\treturn fmt.Errorf(\"could not find column(%s) in table(%s)\", oldColumn, table)\n}\n\nfunc (s *Schema) ColumnInfo(table string, column string) (*fizz.Column, error) {\n\tti, err := s.TableInfo(table)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif ci, ok := s.findColumnInfo(ti, column); ok {\n\t\treturn ci, nil\n\t}\n\treturn nil, fmt.Errorf(\"could not find column data for %s in table %s\", column, table)\n}\n\nfunc (s *Schema) IndexInfo(table string, idx string) (*fizz.Index, error) {\n\tti, err := s.TableInfo(table)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif i, ok := s.findIndexInfo(ti, idx); ok {\n\t\treturn i, nil\n\t}\n\treturn nil, fmt.Errorf(\"could not find index data for %s in table %s\", idx, table)\n}\n\nfunc (s *Schema) Delete(table string) {\n\tdelete(s.schema, table)\n}\n\nfunc (s *Schema) SetTable(table *fizz.Table) {\n\ts.schema[table.Name] = table\n}\n\nfunc (s *Schema) DeleteColumn(table string, column string) {\n\ttableInfo, err := s.TableInfo(table)\n\tif err != nil {\n\t\treturn\n\t}\n\tfor i, col := range tableInfo.Columns {\n\t\tif strings.ToLower(strings.TrimSpace(col.Name)) == strings.ToLower(strings.TrimSpace(column)) {\n\t\t\ttableInfo.Columns = append(tableInfo.Columns[:i], tableInfo.Columns[i+1:]...)\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc (s *Schema) findColumnInfo(tableInfo *fizz.Table, column string) (*fizz.Column, bool) {\n\tfor _, col := range tableInfo.Columns {\n\t\tif strings.ToLower(strings.TrimSpace(col.Name)) == strings.ToLower(strings.TrimSpace(column)) {\n\t\t\treturn &col, true\n\t\t}\n\t}\n\treturn nil, false\n}\n\nfunc (s *Schema) findIndexInfo(tableInfo *fizz.Table, index string) (*fizz.Index, bool) {\n\tfor _, ind := range tableInfo.Indexes {\n\t\tif strings.ToLower(strings.TrimSpace(ind.Name)) == strings.ToLower(strings.TrimSpace(index)) {\n\t\t\treturn &ind, true\n\t\t}\n\t}\n\treturn nil, false\n}\n"
  },
  {
    "path": "translators/schema_test.go",
    "content": "package translators_test\n\nimport (\n\t\"github.com/gobuffalo/fizz\"\n\t\"github.com/gobuffalo/fizz/translators\"\n)\n\nfunc (s *SchemaSuite) buildSchema() translators.Schema {\n\tschema := map[string]*fizz.Table{}\n\tta := fizz.NewTable(\"testTable\", nil)\n\tta.Column(\"testColumn\", \"type\", nil)\n\tta.Indexes = append(ta.Indexes, fizz.Index{Name: \"testIndex\"})\n\tschema[\"testTable\"] = &ta\n\treturn translators.CreateSchema(\"name\", \"url\", schema)\n}\n\nfunc (s *SchemaSuite) Test_Schema_TableInfo() {\n\tr := s.Require()\n\tts := s.buildSchema()\n\tt, err := ts.TableInfo(\"testTable\")\n\tr.NoError(err)\n\tr.Equal(\"testTable\", t.Name)\n}\n\nfunc (s *SchemaSuite) Test_Schema_ColumnInfo() {\n\tr := s.Require()\n\tts := s.buildSchema()\n\tc, err := ts.ColumnInfo(\"testTable\", \"testCOLUMN\")\n\tr.NoError(err)\n\tr.Equal(\"testColumn\", c.Name)\n}\n\nfunc (s *SchemaSuite) Test_Schema_IndexInfo() {\n\tr := s.Require()\n\tts := s.buildSchema()\n\tc, err := ts.IndexInfo(\"testTable\", \"testindEX\")\n\tr.NoError(err)\n\tr.Equal(\"testIndex\", c.Name)\n}\n"
  },
  {
    "path": "translators/sqlite.go",
    "content": "package translators\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/gobuffalo/fizz\"\n)\n\ntype SQLite struct {\n\tSchema SchemaQuery\n}\n\nfunc NewSQLite(url string) *SQLite {\n\tschema := &sqliteSchema{\n\t\tSchema{\n\t\t\tURL:    url,\n\t\t\tschema: map[string]*fizz.Table{},\n\t\t},\n\t}\n\tschema.Builder = schema\n\treturn &SQLite{\n\t\tSchema: schema,\n\t}\n}\n\nfunc (SQLite) Name() string {\n\treturn \"sqlite3\"\n}\n\nfunc (p *SQLite) CreateTable(t fizz.Table) (string, error) {\n\tp.Schema.SetTable(&t)\n\n\tsql := []string{}\n\tcols := []string{}\n\tvar s string\n\tfor _, c := range t.Columns {\n\t\tif c.Primary {\n\t\t\tswitch strings.ToLower(c.ColType) {\n\t\t\tcase \"integer\", \"int\":\n\t\t\t\ts = fmt.Sprintf(\"\\\"%s\\\" INTEGER PRIMARY KEY AUTOINCREMENT\", c.Name)\n\t\t\tcase \"string\", \"text\", \"uuid\":\n\t\t\t\ts = fmt.Sprintf(\"\\\"%s\\\" TEXT PRIMARY KEY\", c.Name)\n\t\t\tdefault:\n\t\t\t\treturn \"\", fmt.Errorf(\"can not use %s as a primary key\", c.ColType)\n\t\t\t}\n\t\t} else {\n\t\t\ts = p.buildColumn(c)\n\t\t}\n\t\tcols = append(cols, s)\n\t}\n\n\tfor _, fk := range t.ForeignKeys {\n\t\tcols = append(cols, p.buildForeignKey(t, fk, true))\n\t}\n\n\tprimaryKeys := t.PrimaryKeys()\n\tif len(primaryKeys) > 1 {\n\t\tpks := make([]string, len(primaryKeys))\n\t\tfor i, pk := range primaryKeys {\n\t\t\tpks[i] = fmt.Sprintf(\"\\\"%s\\\"\", pk)\n\t\t}\n\t\tcols = append(cols, fmt.Sprintf(\"PRIMARY KEY(%s)\", strings.Join(pks, \", \")))\n\t}\n\n\ts = fmt.Sprintf(\"CREATE TABLE \\\"%s\\\" (\\n%s\\n);\", t.Name, strings.Join(cols, \",\\n\"))\n\tsql = append(sql, s)\n\n\tfor _, i := range t.Indexes {\n\t\ts, err := p.AddIndex(fizz.Table{\n\t\t\tName:    t.Name,\n\t\t\tIndexes: []fizz.Index{i},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tsql = append(sql, s)\n\t}\n\treturn strings.Join(sql, \"\\n\"), nil\n}\n\nfunc (p *SQLite) DropTable(t fizz.Table) (string, error) {\n\tp.Schema.Delete(t.Name)\n\ts := fmt.Sprintf(\"DROP TABLE \\\"%s\\\";\", t.Name)\n\treturn s, nil\n}\n\nfunc (p *SQLite) RenameTable(t []fizz.Table) (string, error) {\n\tif len(t) < 2 {\n\t\treturn \"\", fmt.Errorf(\"not enough table names supplied\")\n\t}\n\toldName := t[0].Name\n\tnewName := t[1].Name\n\ttableInfo, err := p.Schema.TableInfo(oldName)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\ttableInfo.Name = newName\n\ts := fmt.Sprintf(\"ALTER TABLE \\\"%s\\\" RENAME TO \\\"%s\\\";\", oldName, newName)\n\treturn s, nil\n}\n\nfunc (p *SQLite) ChangeColumn(t fizz.Table) (string, error) {\n\ttableInfo, err := p.Schema.TableInfo(t.Name)\n\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tfor i := range tableInfo.Columns {\n\t\tif tableInfo.Columns[i].Name == t.Columns[0].Name {\n\t\t\ttableInfo.Columns[i] = t.Columns[0]\n\t\t\tbreak\n\t\t}\n\t}\n\n\tsql := []string{}\n\n\tvar copyIndexes = make([]fizz.Index, len(tableInfo.Indexes))\n\tfor k, i := range tableInfo.Indexes {\n\t\ts, err := p.DropIndex(fizz.Table{\n\t\t\tName:    tableInfo.Name,\n\t\t\tIndexes: []fizz.Index{i},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tsql = append(sql, s)\n\t\tcopyIndexes[k] = i\n\t}\n\ttableInfo.Indexes = copyIndexes // We need to recreate those\n\n\t// We do not need to use withForeignKeyPreservingTempTable here because this will not touch any foreign keys!\n\ts, err := p.withForeignKeyPreservingTempTable(*tableInfo, t.Name, func(newTable fizz.Table, tableName string) (string, error) {\n\t\tif t.Columns[0].Name == \"slug\" {\n\t\t\tfmt.Print(\"asdf\")\n\t\t}\n\t\treturn fmt.Sprintf(\"INSERT INTO \\\"%s\\\" (%s) SELECT %s FROM \\\"%s\\\";\", newTable.Name, strings.Join(newTable.ColumnNames(), \", \"), strings.Join(newTable.ColumnNames(), \", \"), tableName), nil\n\t})\n\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tsql = append(sql, s)\n\n\treturn strings.Join(sql, \"\\n\"), nil\n}\n\nfunc (p *SQLite) AddColumn(t fizz.Table) (string, error) {\n\tif len(t.Columns) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough columns supplied\")\n\t}\n\tc := t.Columns[0]\n\n\ttableInfo, err := p.Schema.TableInfo(t.Name)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\ttableInfo.Columns = append(tableInfo.Columns, c)\n\n\ts := fmt.Sprintf(\"ALTER TABLE \\\"%s\\\" ADD COLUMN %s;\", t.Name, p.buildColumn(c))\n\treturn s, nil\n}\n\nfunc (p *SQLite) DropColumn(t fizz.Table) (string, error) {\n\tif len(t.Columns) < 1 {\n\t\treturn \"\", fmt.Errorf(\"not enough columns supplied\")\n\t}\n\n\ttableInfo, err := p.Schema.TableInfo(t.Name)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tsql := []string{}\n\tdroppedColumn := t.Columns[0]\n\n\tnewColumns := []fizz.Column{}\n\tfor _, c := range tableInfo.Columns {\n\t\tif c.Name != droppedColumn.Name {\n\t\t\tnewColumns = append(newColumns, c)\n\t\t}\n\t}\n\ttableInfo.Columns = newColumns\n\n\tnewIndexes := []fizz.Index{}\n\tfor _, i := range tableInfo.Indexes {\n\t\ts, err := p.DropIndex(fizz.Table{\n\t\t\tName:    tableInfo.Name,\n\t\t\tIndexes: []fizz.Index{i},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tsql = append(sql, s)\n\t\tif tableInfo.HasColumns(i.Columns...) {\n\t\t\tnewIndexes = append(newIndexes, i)\n\t\t}\n\t}\n\ttableInfo.Indexes = newIndexes\n\n\tnewForeignKeys := []fizz.ForeignKey{}\n\tfor _, i := range tableInfo.ForeignKeys {\n\t\tif tableInfo.HasColumns(i.Column) {\n\t\t\tnewForeignKeys = append(newForeignKeys, i)\n\t\t}\n\t}\n\ttableInfo.ForeignKeys = newForeignKeys\n\n\ts, err := p.withForeignKeyPreservingTempTable(*tableInfo, t.Name, func(newTable fizz.Table, tableName string) (string, error) {\n\t\treturn fmt.Sprintf(\"INSERT INTO \\\"%s\\\" (%s) SELECT %s FROM \\\"%s\\\";\\n\", newTable.Name, strings.Join(newTable.ColumnNames(), \", \"), strings.Join(newTable.ColumnNames(), \", \"), tableName), nil\n\t})\n\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tsql = append(sql, s)\n\n\treturn strings.Join(sql, \"\\n\"), nil\n}\n\nfunc (p *SQLite) RenameColumn(t fizz.Table) (string, error) {\n\tif len(t.Columns) < 2 {\n\t\treturn \"\", fmt.Errorf(\"not enough columns supplied\")\n\t}\n\toc := t.Columns[0]\n\tnc := t.Columns[1]\n\ts := fmt.Sprintf(\"ALTER TABLE \\\"%s\\\" RENAME COLUMN \\\"%s\\\" TO \\\"%s\\\";\", t.Name, oc.Name, nc.Name)\n\treturn s, nil\n}\n\nfunc (p *SQLite) AddIndex(t fizz.Table) (string, error) {\n\tif len(t.Indexes) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough indexes supplied\")\n\t}\n\ti := t.Indexes[0]\n\ts := fmt.Sprintf(\"CREATE INDEX \\\"%s\\\" ON \\\"%s\\\" (%s);\", i.Name, t.Name, strings.Join(i.Columns, \", \"))\n\tif i.Unique {\n\t\ts = strings.Replace(s, \"CREATE\", \"CREATE UNIQUE\", 1)\n\t}\n\n\ttableInfo, err := p.Schema.TableInfo(t.Name)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\ttableInfo.Indexes = append(tableInfo.Indexes, i)\n\treturn s, nil\n}\n\nfunc (p *SQLite) DropIndex(t fizz.Table) (string, error) {\n\tif len(t.Indexes) == 0 {\n\t\treturn \"\", fmt.Errorf(\"not enough indexes supplied\")\n\t}\n\ti := t.Indexes[0]\n\ts := fmt.Sprintf(\"DROP INDEX IF EXISTS \\\"%s\\\";\", i.Name)\n\n\ttableInfo, err := p.Schema.TableInfo(t.Name)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tnewIndexes := []fizz.Index{}\n\tfor _, c := range tableInfo.Indexes {\n\t\tif c.Name != i.Name {\n\t\t\tnewIndexes = append(newIndexes, c)\n\t\t}\n\t}\n\ttableInfo.Indexes = newIndexes\n\n\treturn s, nil\n}\n\nfunc (p *SQLite) RenameIndex(t fizz.Table) (string, error) {\n\tif len(t.Indexes) < 2 {\n\t\treturn \"\", fmt.Errorf(\"not enough indexes supplied\")\n\t}\n\n\ttableInfo, err := p.Schema.TableInfo(t.Name)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tsql := []string{}\n\n\toldIndex := t.Indexes[0]\n\tnewIndex := t.Indexes[1]\n\n\tfor _, ti := range tableInfo.Indexes {\n\t\tif ti.Name == oldIndex.Name {\n\t\t\tti.Name = newIndex.Name\n\t\t\tnewIndex = ti\n\t\t\tbreak\n\t\t}\n\t}\n\n\ts, err := p.DropIndex(fizz.Table{\n\t\tName:    tableInfo.Name,\n\t\tIndexes: []fizz.Index{oldIndex},\n\t})\n\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tsql = append(sql, s)\n\n\ts, err = p.AddIndex(fizz.Table{\n\t\tName:    t.Name,\n\t\tIndexes: []fizz.Index{newIndex},\n\t})\n\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tsql = append(sql, s)\n\n\treturn strings.Join(sql, \"\\n\"), nil\n}\n\nfunc (p *SQLite) AddForeignKey(t fizz.Table) (string, error) {\n\treturn \"\", fmt.Errorf(\"SQLite does not support this feature\")\n}\n\nfunc (p *SQLite) DropForeignKey(t fizz.Table) (string, error) {\n\treturn \"\", fmt.Errorf(\"SQLite does not support this feature\")\n}\n\nfunc (p *SQLite) withTempTable(table string, fn func(fizz.Table) (string, error)) (string, error) {\n\ttempTable := fizz.Table{Name: fmt.Sprintf(\"_%s_tmp\", table)}\n\n\ts, err := fn(tempTable)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tsql := []string{\n\t\tfmt.Sprintf(\"ALTER TABLE \\\"%s\\\" RENAME TO \\\"%s\\\";\", table, tempTable.Name),\n\t}\n\n\tsql = append(sql, s, fmt.Sprintf(\"DROP TABLE \\\"%s\\\";\", tempTable.Name))\n\n\treturn strings.Join(sql, \"\\n\"), nil\n}\n\n// withForeignKeyPreservingTempTable create a new temporary table, copies all the contents from the old table over to the new\n// table, removes the old table, and then renames the temporary table to the original table name. This\n// preserves foreign key constraint because because SQLite does not drop foreign keys when their reference table\n// is deleted. It only removes any columns referencing data in the deleted table. [1]\n//\n// [1] https://sqlite.org/lang_droptable.html\nfunc (p *SQLite) withForeignKeyPreservingTempTable(newTable fizz.Table, tableName string, fn func(newTable fizz.Table, tableName string) (string, error)) (string, error) {\n\tvar sql []string\n\n\tnewTable.Name = fmt.Sprintf(\"_%s_tmp\", tableName)\n\tdefer func() {\n\t\tnewTable.Name = tableName\n\t}()\n\n\tcreateTableSQL, err := p.CreateTable(newTable)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tcallbackSQL, err := fn(newTable, tableName)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn strings.Join(append(sql,\n\t\tcreateTableSQL,\n\t\tcallbackSQL,\n\t\tfmt.Sprintf(\"DROP TABLE \\\"%s\\\";\", tableName),\n\t\tfmt.Sprintf(\"ALTER TABLE \\\"%s\\\" RENAME TO \\\"%s\\\";\", newTable.Name, tableName),\n\t), \"\\n\"), nil\n}\n\nfunc (p *SQLite) buildColumn(c fizz.Column) string {\n\ts := fmt.Sprintf(\"\\\"%s\\\" %s\", c.Name, p.colType(c))\n\tif c.Options[\"null\"] == nil {\n\t\ts = fmt.Sprintf(\"%s NOT NULL\", s)\n\t}\n\tif c.Options[\"default\"] != nil {\n\t\ts = fmt.Sprintf(\"%s DEFAULT '%v'\", s, c.Options[\"default\"])\n\t}\n\tif c.Options[\"default_raw\"] != nil {\n\t\ts = fmt.Sprintf(\"%s DEFAULT %s\", s, c.Options[\"default_raw\"])\n\t}\n\treturn s\n}\n\nfunc (p *SQLite) colType(c fizz.Column) string {\n\tswitch strings.ToLower(c.ColType) {\n\tcase \"uuid\":\n\t\treturn \"char(36)\"\n\tcase \"timestamp\", \"time\", \"datetime\":\n\t\treturn \"DATETIME\"\n\tcase \"boolean\", \"date\":\n\t\treturn \"NUMERIC\"\n\tcase \"string\", \"text\":\n\t\treturn \"TEXT\"\n\tcase \"int\", \"integer\":\n\t\treturn \"INTEGER\"\n\tcase \"float\":\n\t\t// precision and scale not supported here\n\t\treturn \"REAL\"\n\tcase \"json\":\n\t\treturn \"TEXT\"\n\tcase \"blob\", \"[]byte\":\n\t\treturn \"BLOB\"\n\tdefault:\n\t\treturn c.ColType\n\t}\n}\n\nfunc (p *SQLite) buildForeignKey(t fizz.Table, fk fizz.ForeignKey, onCreate bool) string {\n\trefs := fmt.Sprintf(\"%s (%s)\", fk.References.Table, strings.Join(fk.References.Columns, \", \"))\n\ts := fmt.Sprintf(\"FOREIGN KEY (%s) REFERENCES %s\", fk.Column, refs)\n\n\tif onUpdate, ok := fk.Options[\"on_update\"]; ok {\n\t\ts += fmt.Sprintf(\" ON UPDATE %s\", onUpdate)\n\t}\n\n\tif onDelete, ok := fk.Options[\"on_delete\"]; ok {\n\t\ts += fmt.Sprintf(\" ON DELETE %s\", onDelete)\n\t}\n\n\tif !onCreate {\n\t\ts = fmt.Sprintf(\"ALTER TABLE %s ADD CONSTRAINT %s %s\", t.Name, fk.Name, s)\n\t}\n\n\treturn s\n}\n"
  },
  {
    "path": "translators/sqlite_meta.go",
    "content": "package translators\n\nimport (\n\t\"database/sql\"\n\t\"fmt\"\n\t\"regexp\"\n\t\"strings\"\n\n\t\"github.com/gobuffalo/fizz\"\n)\n\ntype sqliteIndexListInfo struct {\n\tSeq     int    `db:\"seq\"`\n\tName    string `db:\"name\"`\n\tUnique  bool   `db:\"unique\"`\n\tOrigin  string `db:\"origin\"`\n\tPartial string `db:\"partial\"`\n}\n\ntype sqliteForeignKeyListInfo struct {\n\tID       int    `db:\"id\"`\n\tSeq      int    `db:\"seq\"`\n\tFrom     string `db:\"from\"`\n\tTo       string `db:\"to\"`\n\tTable    string `db:\"table\"`\n\tOnUpdate string `db:\"on_update\"`\n\tOnDelete string `db:\"on_delete\"`\n\tMatch    string `db:\"match\"`\n}\n\ntype sqliteIndexInfo struct {\n\tSeq  int    `db:\"seqno\"`\n\tCID  int    `db:\"cid\"`\n\tName string `db:\"name\"`\n}\n\ntype sqliteTableInfo struct {\n\tCID     int         `db:\"cid\"`\n\tName    string      `db:\"name\"`\n\tType    string      `db:\"type\"`\n\tNotNull bool        `db:\"notnull\"`\n\tDefault interface{} `db:\"dflt_value\"`\n\tPK      bool        `db:\"pk\"`\n}\n\nfunc (t sqliteTableInfo) ToColumn() fizz.Column {\n\tc := fizz.Column{\n\t\tName:    t.Name,\n\t\tColType: t.Type,\n\t\tPrimary: t.PK,\n\t\tOptions: fizz.Options{},\n\t}\n\tif !t.NotNull {\n\t\tc.Options[\"null\"] = true\n\t}\n\tif t.Default != nil {\n\t\tc.Options[\"default\"] = strings.TrimSuffix(strings.TrimPrefix(fmt.Sprintf(\"%s\", t.Default), \"'\"), \"'\")\n\t}\n\treturn c\n}\n\ntype sqliteSchema struct {\n\tSchema\n}\n\nfunc (p *sqliteSchema) Build() error {\n\tvar err error\n\tdb, err := sql.Open(\"sqlite3\", p.URL)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer db.Close()\n\n\tres, err := db.Query(\"SELECT name FROM sqlite_master WHERE type='table';\")\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer res.Close()\n\n\tfor res.Next() {\n\t\ttable := &fizz.Table{\n\t\t\tColumns: []fizz.Column{},\n\t\t\tIndexes: []fizz.Index{},\n\t\t}\n\t\terr = res.Scan(&table.Name)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif table.Name != \"sqlite_sequence\" {\n\t\t\terr = p.buildTableData(table, db)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t}\n\treturn nil\n}\n\nfunc (p *sqliteSchema) buildTableData(table *fizz.Table, db *sql.DB) error {\n\tprag := fmt.Sprintf(`SELECT \"cid\", \"name\", \"type\", \"notnull\", \"dflt_value\", \"pk\" FROM pragma_table_info('%s')`, table.Name)\n\n\tres, err := db.Query(prag)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer res.Close()\n\n\tfor res.Next() {\n\t\tti := sqliteTableInfo{}\n\t\terr = res.Scan(&ti.CID, &ti.Name, &ti.Type, &ti.NotNull, &ti.Default, &ti.PK)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttable.Columns = append(table.Columns, ti.ToColumn())\n\t}\n\terr = p.buildTableIndexes(table, db)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = p.buildTableForeignKeyIndexes(table, db)\n\tif err != nil {\n\t\treturn err\n\t}\n\tp.schema[table.Name] = table\n\treturn nil\n}\n\nfunc (p *sqliteSchema) buildTableIndexes(t *fizz.Table, db *sql.DB) error {\n\t// This ignores all internal SQLite keys which are prefixed with `sqlite_` as explained here:\n\t// https://www.sqlite.org/fileformat2.html#intschema\n\tprag := fmt.Sprintf(`SELECT \"seq\", \"name\", \"unique\", \"origin\", \"partial\" FROM pragma_index_list('%s') WHERE \"name\" NOT LIKE 'sqlite_%%'`, t.Name)\n\tres, err := db.Query(prag)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer res.Close()\n\n\tfor res.Next() {\n\t\tli := sqliteIndexListInfo{}\n\t\terr = res.Scan(&li.Seq, &li.Name, &li.Unique, &li.Origin, &li.Partial)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\ti := fizz.Index{\n\t\t\tName:    li.Name,\n\t\t\tUnique:  li.Unique,\n\t\t\tColumns: []string{},\n\t\t}\n\n\t\tprag = fmt.Sprintf(`SELECT \"seqno\", \"cid\", \"name\" FROM pragma_index_info('%s');`, i.Name)\n\t\tiires, err := db.Query(prag)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer iires.Close()\n\n\t\tfor iires.Next() {\n\t\t\tii := sqliteIndexInfo{}\n\t\t\terr = iires.Scan(&ii.Seq, &ii.CID, &ii.Name)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\ti.Columns = append(i.Columns, ii.Name)\n\t\t}\n\n\t\tt.Indexes = append(t.Indexes, i)\n\n\t}\n\treturn nil\n}\n\nvar tmpTable = regexp.MustCompile(\"^_(.*)_tmp$\")\n\nfunc canonicalizeSQLiteTable(table string) string {\n\tmatches := tmpTable.FindAllStringSubmatch(table, 1)\n\tif len(matches) == 1 && len(matches[0]) == 2 {\n\t\treturn matches[0][1]\n\t}\n\treturn table\n}\n\nfunc (p *sqliteSchema) buildTableForeignKeyIndexes(t *fizz.Table, db *sql.DB) error {\n\t// This ignores all internal SQLite keys which are prefixed with `sqlite_` as explained here:\n\t// https://www.sqlite.org/fileformat2.html#intschema\n\tprag := fmt.Sprintf(`SELECT \"seq\", \"table\", \"from\", \"to\", \"on_update\", \"on_delete\", \"match\" FROM pragma_foreign_key_list('%s')`, t.Name)\n\tres, err := db.Query(prag)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer res.Close()\n\n\tforeignKeys := []fizz.ForeignKey{}\n\tfor res.Next() {\n\t\tli := sqliteForeignKeyListInfo{}\n\t\terr = res.Scan(&li.Seq, &li.Table, &li.From, &li.To, &li.OnUpdate, &li.OnDelete, &li.Match)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\toptions := map[string]interface{}{}\n\t\tif li.OnDelete != \"\" {\n\t\t\toptions[\"on_delete\"] = li.OnDelete\n\t\t}\n\n\t\tif li.OnUpdate != \"\" {\n\t\t\toptions[\"on_update\"] = li.OnUpdate\n\t\t}\n\n\t\ti := fizz.ForeignKey{\n\t\t\tColumn: li.From,\n\t\t\tReferences: fizz.ForeignKeyRef{\n\t\t\t\tTable:   canonicalizeSQLiteTable(li.Table),\n\t\t\t\tColumns: []string{li.To},\n\t\t\t},\n\t\t\tOptions: options,\n\t\t}\n\t\ti.Name = fmt.Sprintf(\"%s_%s_%s_fk\", t.Name, i.References.Table, strings.Join(i.References.Columns, \"_\"))\n\n\t\tforeignKeys = append(foreignKeys, i)\n\t}\n\tt.ForeignKeys = foreignKeys\n\treturn nil\n}\n"
  },
  {
    "path": "translators/sqlite_meta_test.go",
    "content": "package translators\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestCanonicalizeSQLiteTable(t *testing.T) {\n\tassert.Equal(t, \"e2e_users\", canonicalizeSQLiteTable(\"_e2e_users_tmp\"))\n\tassert.Equal(t, \"e2e_users_tmp\", canonicalizeSQLiteTable(\"_e2e_users_tmp_tmp\"))\n\tassert.Equal(t, \"e2e_users_tmp\", canonicalizeSQLiteTable(\"e2e_users_tmp\"))\n\tassert.Equal(t, \"_e2e_users_tm\", canonicalizeSQLiteTable(\"_e2e_users_tm\"))\n\tassert.Equal(t, \"_e2e_users_tmp_\", canonicalizeSQLiteTable(\"_e2e_users_tmp_\"))\n}\n"
  },
  {
    "path": "translators/sqlite_test.go",
    "content": "package translators_test\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/gobuffalo/fizz\"\n\t\"github.com/gobuffalo/fizz/translators\"\n)\n\nvar IntIDCol = fizz.Column{\n\tName:    \"id\",\n\tPrimary: true,\n\tColType: \"integer\",\n\tOptions: fizz.Options{},\n}\n\nvar _ fizz.Translator = (*translators.SQLite)(nil)\nvar schema = &fauxSchema{schema: map[string]*fizz.Table{}}\nvar sqt = &translators.SQLite{Schema: schema}\n\ntype fauxSchema struct {\n\tschema map[string]*fizz.Table\n}\n\nfunc (s *fauxSchema) Build() error {\n\treturn nil\n}\n\nfunc (s *fauxSchema) IndexInfo(table string, column string) (*fizz.Index, error) {\n\treturn nil, fmt.Errorf(\"IndexInfo is not implemented for this translator!\")\n}\n\nfunc (s *fauxSchema) ReplaceSchema(schema map[string]*fizz.Table) {\n\ts.schema = schema\n}\n\nfunc (s *fauxSchema) DeleteColumn(table string, column string) {\n\treturn\n}\n\nfunc (s *fauxSchema) ReplaceColumn(table string, column string, newColumn fizz.Column) error {\n\treturn fmt.Errorf(\"ReplaceColumn is not implemented for this translator!\")\n}\n\nfunc (s *fauxSchema) ColumnInfo(table string, column string) (*fizz.Column, error) {\n\treturn nil, fmt.Errorf(\"ColumnInfo is not implemented for this translator!\")\n}\n\nfunc (p *fauxSchema) Delete(table string) {\n\tdelete(p.schema, table)\n}\n\nfunc (s *fauxSchema) SetTable(table *fizz.Table) {\n\ts.schema[table.Name] = table\n}\n\nfunc (p *fauxSchema) TableInfo(table string) (*fizz.Table, error) {\n\tif ti, ok := p.schema[table]; ok {\n\t\treturn ti, nil\n\t}\n\treturn nil, fmt.Errorf(\"Could not find table data for %s!\", table)\n}\n\nfunc (p *SQLiteSuite) Test_SQLite_CreateTable() {\n\tr := p.Require()\n\tddl := `CREATE TABLE \"users\" (\n\"id\" INTEGER PRIMARY KEY AUTOINCREMENT,\n\"first_name\" TEXT NOT NULL,\n\"last_name\" TEXT NOT NULL,\n\"email\" TEXT NOT NULL,\n\"permissions\" TEXT,\n\"age\" INTEGER DEFAULT '40',\n\"raw\" BLOB NOT NULL,\n\"into\" INTEGER NOT NULL,\n\"flotante\" REAL NOT NULL,\n\"json\" TEXT NOT NULL,\n\"bytes\" BLOB NOT NULL,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);`\n\n\tres, _ := fizz.AString(`\n\tcreate_table(\"users\") {\n\t\tt.Column(\"id\", \"integer\", {\"primary\": true})\n\t\tt.Column(\"first_name\", \"string\", {})\n\t\tt.Column(\"last_name\", \"string\", {})\n\t\tt.Column(\"email\", \"string\", {\"size\":20})\n\t\tt.Column(\"permissions\", \"text\", {\"null\": true})\n\t\tt.Column(\"age\", \"integer\", {\"null\": true, \"default\": 40})\n\t\tt.Column(\"raw\", \"blob\", {})\n\t\tt.Column(\"into\", \"int\", {})\n\t\tt.Column(\"flotante\", \"float\", {})\n\t\tt.Column(\"json\", \"json\", {})\n\t\tt.Column(\"bytes\", \"[]byte\", {})\n\t}\n\t`, sqt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *SQLiteSuite) Test_SQLite_CreateTable_UUID() {\n\tr := p.Require()\n\tddl := `CREATE TABLE \"users\" (\n\"first_name\" TEXT NOT NULL,\n\"last_name\" TEXT NOT NULL,\n\"email\" TEXT NOT NULL,\n\"permissions\" TEXT,\n\"age\" INTEGER DEFAULT '40',\n\"company_id\" char(36) NOT NULL DEFAULT lower(hex(randomblob(16))),\n\"uuid\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);`\n\n\tres, _ := fizz.AString(`\n\tcreate_table(\"users\") {\n\t\tt.Column(\"first_name\", \"string\", {})\n\t\tt.Column(\"last_name\", \"string\", {})\n\t\tt.Column(\"email\", \"string\", {\"size\":20})\n\t\tt.Column(\"permissions\", \"text\", {\"null\": true})\n\t\tt.Column(\"age\", \"integer\", {\"null\": true, \"default\": 40})\n\t\tt.Column(\"company_id\", \"uuid\", {\"default_raw\": \"lower(hex(randomblob(16)))\"})\n\t\tt.Column(\"uuid\", \"uuid\", {\"primary\": true})\n\t}\n\t`, sqt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *SQLiteSuite) Test_SQLite_CreateTables_WithCompositePrimaryKey() {\n\tr := p.Require()\n\tddl := `CREATE TABLE \"user_profiles\" (\n\"user_id\" INTEGER NOT NULL,\n\"profile_id\" INTEGER NOT NULL,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL,\nPRIMARY KEY(\"user_id\", \"profile_id\")\n);`\n\n\tres, _ := fizz.AString(`\n\tcreate_table(\"user_profiles\") {\n\t\tt.Column(\"user_id\", \"INT\")\n\t\tt.Column(\"profile_id\", \"INT\")\n\t\tt.PrimaryKey(\"user_id\", \"profile_id\")\n\t}\n\t`, sqt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *SQLiteSuite) Test_SQLite_DropTable() {\n\tr := p.Require()\n\n\tddl := `DROP TABLE \"users\";`\n\n\tres, _ := fizz.AString(`drop_table(\"users\")`, sqt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *SQLiteSuite) Test_SQLite_RenameTable() {\n\tr := p.Require()\n\n\tddl := `ALTER TABLE \"users\" RENAME TO \"people\";`\n\tschema.schema[\"users\"] = &fizz.Table{}\n\n\tres, _ := fizz.AString(`rename_table(\"users\", \"people\")`, sqt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *SQLiteSuite) Test_SQLite_RenameTable_NotEnoughValues() {\n\tr := p.Require()\n\n\t_, err := sqt.RenameTable([]fizz.Table{})\n\tr.Error(err)\n}\n\nfunc (p *SQLiteSuite) Test_SQLite_ChangeColumn() {\n\tr := p.Require()\n\n\tddl := `CREATE TABLE \"_users_tmp\" (\n\"id\" INTEGER PRIMARY KEY AUTOINCREMENT,\n\"created_at\" TEXT NOT NULL DEFAULT 'foo',\n\"updated_at\" DATETIME NOT NULL\n);\nINSERT INTO \"_users_tmp\" (id, created_at, updated_at) SELECT id, created_at, updated_at FROM \"users\";\nDROP TABLE \"users\";\nALTER TABLE \"_users_tmp\" RENAME TO \"users\";`\n\n\tschema.schema[\"users\"] = &fizz.Table{\n\t\tName: \"users\",\n\t\tColumns: []fizz.Column{\n\t\t\tIntIDCol,\n\t\t\tfizz.CREATED_COL,\n\t\t\tfizz.UPDATED_COL,\n\t\t},\n\t}\n\n\tres, _ := fizz.AString(`change_column(\"users\", \"created_at\", \"string\", {\"default\": \"foo\", \"size\": 50})`, sqt)\n\n\tr.Equal(ddl, res)\n}\n\nfunc (p *SQLiteSuite) Test_SQLite_AddColumn() {\n\tr := p.Require()\n\n\tddl := `ALTER TABLE \"users\" ADD COLUMN \"mycolumn\" TEXT NOT NULL DEFAULT 'foo';`\n\tschema.schema[\"users\"] = &fizz.Table{}\n\n\tres, _ := fizz.AString(`add_column(\"users\", \"mycolumn\", \"string\", {\"default\": \"foo\", \"size\": 50})`, sqt)\n\n\tr.Equal(ddl, res)\n}\n\nfunc (p *SQLiteSuite) Test_SQLite_DropColumn() {\n\tr := p.Require()\n\tddl := `CREATE TABLE \"_users_tmp\" (\n\"id\" INTEGER PRIMARY KEY AUTOINCREMENT,\n\"updated_at\" DATETIME NOT NULL\n);\nINSERT INTO \"_users_tmp\" (id, updated_at) SELECT id, updated_at FROM \"users\";\n\nDROP TABLE \"users\";\nALTER TABLE \"_users_tmp\" RENAME TO \"users\";`\n\n\tschema.schema[\"users\"] = &fizz.Table{\n\t\tName: \"users\",\n\t\tColumns: []fizz.Column{\n\t\t\tIntIDCol,\n\t\t\tfizz.CREATED_COL,\n\t\t\tfizz.UPDATED_COL,\n\t\t},\n\t}\n\tres, _ := fizz.AString(`drop_column(\"users\", \"created_at\")`, sqt)\n\n\tr.Equal(ddl, res)\n}\n\nfunc (p *SQLiteSuite) Test_SQLite_RenameColumn() {\n\tr := p.Require()\n\tddl := `ALTER TABLE \"users\" RENAME COLUMN \"created_at\" TO \"created_when\";`\n\n\tschema.schema[\"users\"] = &fizz.Table{\n\t\tName: \"users\",\n\t\tColumns: []fizz.Column{\n\t\t\tIntIDCol,\n\t\t\tfizz.CREATED_COL,\n\t\t\tfizz.UPDATED_COL,\n\t\t},\n\t}\n\tres, _ := fizz.AString(`rename_column(\"users\", \"created_at\", \"created_when\")`, sqt)\n\n\tr.Equal(ddl, res)\n}\n\nfunc (p *SQLiteSuite) Test_SQLite_AddIndex() {\n\tr := p.Require()\n\n\tschema.schema[\"table_name\"] = &fizz.Table{\n\t\tName: \"table_name\",\n\t\tColumns: []fizz.Column{\n\t\t\t{\n\t\t\t\tName: \"column_name\",\n\t\t\t},\n\t\t},\n\t}\n\n\tddl := `CREATE INDEX \"table_name_column_name_idx\" ON \"table_name\" (column_name);`\n\n\tres, _ := fizz.AString(`add_index(\"table_name\", \"column_name\", {})`, sqt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *SQLiteSuite) Test_SQLite_AddIndex_Unique() {\n\tr := p.Require()\n\tddl := `CREATE UNIQUE INDEX \"table_name_column_name_idx\" ON \"table_name\" (column_name);`\n\n\tres, _ := fizz.AString(`add_index(\"table_name\", \"column_name\", {\"unique\": true})`, sqt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *SQLiteSuite) Test_SQLite_AddIndex_MultiColumn() {\n\tr := p.Require()\n\tddl := `CREATE INDEX \"table_name_col1_col2_col3_idx\" ON \"table_name\" (col1, col2, col3);`\n\n\tres, _ := fizz.AString(`add_index(\"table_name\", [\"col1\", \"col2\", \"col3\"], {})`, sqt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *SQLiteSuite) Test_SQLite_AddIndex_CustomName() {\n\tr := p.Require()\n\tddl := `CREATE INDEX \"custom_name\" ON \"table_name\" (column_name);`\n\n\tres, _ := fizz.AString(`add_index(\"table_name\", \"column_name\", {\"name\": \"custom_name\"})`, sqt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *SQLiteSuite) Test_SQLite_DropIndex() {\n\tr := p.Require()\n\n\tschema.schema[\"my_table\"] = &fizz.Table{\n\t\tName: \"my_table\",\n\t\tIndexes: []fizz.Index{\n\t\t\t{\n\t\t\t\tName: \"my_idx\",\n\t\t\t},\n\t\t},\n\t}\n\n\tddl := `DROP INDEX IF EXISTS \"my_idx\";`\n\n\tres, _ := fizz.AString(`drop_index(\"my_table\", \"my_idx\")`, sqt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *SQLiteSuite) Test_SQLite_RenameIndex() {\n\tr := p.Require()\n\n\tddl := `DROP INDEX IF EXISTS \"old_ix\";\nCREATE UNIQUE INDEX \"new_ix\" ON \"users\" (id, created_at);`\n\n\tschema.schema[\"users\"] = &fizz.Table{\n\t\tName: \"users\",\n\t\tColumns: []fizz.Column{\n\t\t\tIntIDCol,\n\t\t\tfizz.CREATED_COL,\n\t\t\tfizz.UPDATED_COL,\n\t\t},\n\t\tIndexes: []fizz.Index{\n\t\t\t{\n\t\t\t\tName:    \"old_ix\",\n\t\t\t\tColumns: []string{\"id\", \"created_at\"},\n\t\t\t\tUnique:  true,\n\t\t\t},\n\t\t},\n\t}\n\n\tres, _ := fizz.AString(`rename_index(\"users\", \"old_ix\", \"new_ix\")`, sqt)\n\tr.Equal(ddl, res)\n}\n\nfunc (p *SQLiteSuite) Test_SQLite_DropColumnWithForeignKey() {\n\tr := p.Require()\n\n\tres, _ := fizz.AString(`\n\tcreate_table(\"users\") {\n\t\tt.Column(\"uuid\", \"uuid\", {\"primary\": true})\n\t}\n\n\tcreate_table(\"user_notes\") {\n\t\tt.Column(\"uuid\", \"uuid\", {\"primary\": true})\n\t\tt.Column(\"user_id\", \"uuid\")\n\t\tt.Column(\"notes\", \"string\")\n    \tt.ForeignKey(\"user_id\", {\"users\": [\"uuid\"]}, {\"on_delete\": \"cascade\"})\n\t}`, sqt)\n\tr.Equal(`CREATE TABLE \"users\" (\n\"uuid\" TEXT PRIMARY KEY,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL\n);\nCREATE TABLE \"user_notes\" (\n\"uuid\" TEXT PRIMARY KEY,\n\"user_id\" char(36) NOT NULL,\n\"notes\" TEXT NOT NULL,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL,\nFOREIGN KEY (user_id) REFERENCES users (uuid) ON DELETE cascade\n);`, res)\n\n\tres, _ = fizz.AString(`drop_column(\"user_notes\",\"notes\")`, sqt)\n\tr.Equal(`CREATE TABLE \"_user_notes_tmp\" (\n\"uuid\" TEXT PRIMARY KEY,\n\"user_id\" char(36) NOT NULL,\n\"created_at\" DATETIME NOT NULL,\n\"updated_at\" DATETIME NOT NULL,\nFOREIGN KEY (user_id) REFERENCES users (uuid) ON DELETE cascade\n);\nINSERT INTO \"_user_notes_tmp\" (uuid, user_id, created_at, updated_at) SELECT uuid, user_id, created_at, updated_at FROM \"user_notes\";\n\nDROP TABLE \"user_notes\";\nALTER TABLE \"_user_notes_tmp\" RENAME TO \"user_notes\";`, res)\n\n\tres, _ = fizz.AString(`rename_table(\"users\",\"user_accounts\")`, sqt)\n\tr.Equal(`ALTER TABLE \"users\" RENAME TO \"user_accounts\";`, res)\n\n\tres, _ = fizz.AString(`add_column(\"user_notes\",\"notes\",\"string\")`, sqt)\n\tr.Equal(`ALTER TABLE \"user_notes\" ADD COLUMN \"notes\" TEXT NOT NULL;`, res)\n}\n"
  },
  {
    "path": "translators/translators_test.go",
    "content": "package translators_test\n\nimport (\n\t\"os\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/suite\"\n)\n\ntype CockroachSuite struct {\n\tsuite.Suite\n}\n\ntype PostgreSQLSuite struct {\n\tsuite.Suite\n}\n\ntype MySQLSuite struct {\n\tsuite.Suite\n}\n\ntype MariaDBSuite struct {\n\tsuite.Suite\n}\n\ntype MsSqlServerSQLSuite struct {\n\tsuite.Suite\n}\n\ntype SQLiteSuite struct {\n\tsuite.Suite\n}\n\ntype SchemaSuite struct {\n\tsuite.Suite\n}\n\nfunc TestSpecificSuites(t *testing.T) {\n\tswitch os.Getenv(\"SODA_DIALECT\") {\n\tcase \"postgres\":\n\t\tsuite.Run(t, &PostgreSQLSuite{})\n\tcase \"cockroach\":\n\t\tsuite.Run(t, &CockroachSuite{})\n\tcase \"mysql\", \"mysql_travis\":\n\t\tsuite.Run(t, &MySQLSuite{})\n\tcase \"mariadb\":\n\t\tsuite.Run(t, &MariaDBSuite{})\n\tcase \"sqlserver\":\n\t\tsuite.Run(t, &MsSqlServerSQLSuite{})\n\tcase \"sqlite\":\n\t\tsuite.Run(t, &SQLiteSuite{})\n\t}\n\n\tsuite.Run(t, &SchemaSuite{})\n}\n\nfunc getEnv(key, defaultValue string) string {\n\tif v, found := os.LookupEnv(key); found {\n\t\treturn v\n\t}\n\treturn defaultValue\n}\n"
  },
  {
    "path": "version.go",
    "content": "package fizz\n\n// Version gives the current fizz version.\nconst Version = \"v1.14.3\"\n"
  }
]