#4519·ent

bug: concurrent migration data race in ent/atlas

Author: lrstanleyCreated Sep 12, 2026Updated Sep 12, 2026
  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior

Commit 397ebe9 added schema.Table.mu and locking around Atlas.setupTables to allow concurrent migrations without copying generated tables.

However, concurrent migrations still report data races when they use the shared generated schema tables, even if each migration targets a unique SQLite database (e.g. in-memory database).

Expected Behavior

Concurrent migrations using separate databases should be race-free when the generated schema tables are shared.

Steps to Reproduce

Our tests create a unique in-memory SQLite (modernc) database for every test, so there is an empty database state:

go
func NewClient(tb testing.TB) *ent.Client {
	tb.Helper()

	db, err := database.OpenDSN(ctx, uniqueMemoryDSN())
	if err != nil {
		tb.Fatal(err)
	}

	if err := database.Migrate(ctx, db); err != nil {
		tb.Fatal(err)
	}

	return db
}

Tests run in parallel, so multiple calls to database.Migrate execute concurrently against different databases.

Example of some of these races
bash
go test -race ./internal/...
==================
WARNING: DATA RACE
Write at 0x00000394aa38 by goroutine 27:
  entgo.io/ent/dialect/sql/schema.(*Atlas).setupTables()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:1100 +0x7ef
  entgo.io/ent/dialect/sql/schema.(*Atlas).Create()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:107 +0x70
  github.com/lrstanley/moroi/internal/database/ent/migrate.Create()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/database/ent/migrate/migrate.go:58 +0x1b2
  github.com/lrstanley/moroi/internal/database/ent/migrate.(*Schema).Create()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/database/ent/migrate/migrate.go:49 +0x91
  github.com/lrstanley/moroi/internal/database.Migrate()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/database/client.go:94 +0x195
  github.com/lrstanley/moroi/internal/database/schematests.NewClient()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/database/schematests/core.go:46 +0x144
  github.com/lrstanley/moroi/internal/auth_test.TestLookupRevokedAPIKey()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/auth/apikey_test.go:131 +0x4f
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:2193 +0x21c
  testing.(*T).Run.gowrap1()
      /usr/local/go/src/testing/testing.go:2258 +0x38

Previous read at 0x00000394aa38 by goroutine 24:
  entgo.io/ent/dialect/sql/schema.(*Atlas).realm()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:908 +0x1512
  entgo.io/ent/dialect/sql/schema.(*Atlas).StateReader.func1()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:535 +0x616
  ariga.io/atlas/sql/migrate.StateReaderFunc.ReadState()
      /home/liam/go/pkg/mod/ariga.io/[email protected]/sql/migrate/migrate.go:149 +0x558
  entgo.io/ent/dialect/sql/schema.(*Atlas).planInspect()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:692 +0x45e
  ariga.io/atlas/sql/sqlite.(*inspect).InspectSchema()
      /home/liam/go/pkg/mod/ariga.io/[email protected]/sql/sqlite/driver.go:451 +0x5d0
  ariga.io/atlas/sql/sqlite.(*inspect).databases()
      /home/liam/go/pkg/mod/ariga.io/[email protected]/sql/sqlite/inspect.go:344 +0x225
  ariga.io/atlas/sql/sqlite.(*inspect).InspectSchema()
      /home/liam/go/pkg/mod/ariga.io/[email protected]/sql/sqlite/driver.go:432 +0x158
  entgo.io/ent/dialect/sql/schema.(*Atlas).planInspect()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:671 +0x32b
  entgo.io/ent/dialect/sql/schema.(*Atlas).planInspect()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:671 +0x32b
  entgo.io/ent/dialect/sql/schema.(*Atlas).create()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:622 +0x116f
  entgo.io/ent/dialect/sql.ScanOne()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/scan.go:19 +0x5c
  entgo.io/ent/dialect/sql.ScanInt64()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/scan.go:44 +0x5d
  entgo.io/ent/dialect/sql.ScanInt()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/scan.go:52 +0x31d
  entgo.io/ent/dialect/sql/schema.exist()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/migrate.go:134 +0x327
  entgo.io/ent/dialect/sql/schema.exist()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/migrate.go:130 +0x12d
  entgo.io/ent/dialect/sql/schema.exist()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/migrate.go:130 +0x12d
  entgo.io/ent/dialect/sql/schema.(*SQLite).init()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/sqlite.go:68 +0x78
  entgo.io/ent/dialect/sql/schema.(*Atlas).create()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:614 +0xdd0
  entgo.io/ent/dialect/sql.ScanInt64()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/scan.go:44 +0x5d
  entgo.io/ent/dialect/sql.ScanInt()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/scan.go:52 +0x31d
  entgo.io/ent/dialect/sql/schema.exist()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/migrate.go:134 +0x327
  entgo.io/ent/dialect/sql/schema.exist()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/migrate.go:130 +0x12d
  entgo.io/ent/dialect/sql/schema.exist()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/migrate.go:130 +0x12d
  entgo.io/ent/dialect/sql/schema.(*SQLite).init()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/sqlite.go:68 +0x78
  entgo.io/ent/dialect/sql/schema.(*Atlas).entDialect()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:1134 +0x307
  entgo.io/ent/dialect/sql/schema.(*Atlas).create()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:598 +0x9be
  entgo.io/ent/dialect/sql/schema.(*Atlas).create-fm()
      <autogenerated>:1 +0x5c
  entgo.io/ent/dialect/sql/schema.CreateFunc.Create()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/migrate.go:124 +0x5c
  entgo.io/ent/dialect/sql/schema.(*Atlas).Create()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:112 +0x1ad
  github.com/lrstanley/moroi/internal/database/ent/migrate.Create()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/database/ent/migrate/migrate.go:58 +0x1b2
  github.com/lrstanley/moroi/internal/database/ent/migrate.(*Schema).Create()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/database/ent/migrate/migrate.go:49 +0x91
  github.com/lrstanley/moroi/internal/database.Migrate()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/database/client.go:94 +0x195
  github.com/lrstanley/moroi/internal/database/schematests.NewClient()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/database/schematests/core.go:46 +0x144
  github.com/lrstanley/moroi/internal/auth_test.TestCreateAndLookupAPIKey()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/auth/apikey_test.go:42 +0x52
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:2193 +0x21c
  testing.(*T).Run.gowrap1()
      /usr/local/go/src/testing/testing.go:2258 +0x38

Goroutine 27 (running) created at:
  testing.(*T).Run()
      /usr/local/go/src/testing/testing.go:2258 +0xb12
  testing.runTests.func1()
      /usr/local/go/src/testing/testing.go:2742 +0x84
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:2193 +0x21c
  testing.runTests()
      /usr/local/go/src/testing/testing.go:2740 +0x9e9
  testing.(*M).Run()
      /usr/local/go/src/testing/testing.go:2600 +0xf44
  main.main()
      _testmain.go:82 +0x164

Goroutine 24 (running) created at:
  testing.(*T).Run()
      /usr/local/go/src/testing/testing.go:2258 +0xb12
  testing.runTests.func1()
      /usr/local/go/src/testing/testing.go:2742 +0x84
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:2193 +0x21c
  testing.runTests()
      /usr/local/go/src/testing/testing.go:2740 +0x9e9
  testing.(*M).Run()
      /usr/local/go/src/testing/testing.go:2600 +0xf44
  main.main()
      _testmain.go:82 +0x164
==================
==================
WARNING: DATA RACE
Write at 0x00000394a400 by goroutine 27:
  entgo.io/ent/dialect/sql/schema.(*Atlas).setupTables()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:1089 +0x2fe
  entgo.io/ent/dialect/sql/schema.(*Atlas).Create()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:107 +0x70
  github.com/lrstanley/moroi/internal/database/ent/migrate.Create()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/database/ent/migrate/migrate.go:58 +0x1b2
  github.com/lrstanley/moroi/internal/database/ent/migrate.(*Schema).Create()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/database/ent/migrate/migrate.go:49 +0x91
  github.com/lrstanley/moroi/internal/database.Migrate()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/database/client.go:94 +0x195
  github.com/lrstanley/moroi/internal/database/schematests.NewClient()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/database/schematests/core.go:46 +0x144
  github.com/lrstanley/moroi/internal/auth_test.TestLookupRevokedAPIKey()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/auth/apikey_test.go:131 +0x4f
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:2193 +0x21c
  testing.(*T).Run.gowrap1()
      /usr/local/go/src/testing/testing.go:2258 +0x38

Previous read at 0x00000394a400 by goroutine 24:
  entgo.io/ent/dialect/sql/schema.(*Atlas).aIndexes()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:1063 +0x427
  entgo.io/ent/dialect/sql/schema.(*Atlas).realm()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:896 +0x1072
  entgo.io/ent/dialect/sql/schema.(*Atlas).StateReader.func1()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:535 +0x616
  ariga.io/atlas/sql/migrate.StateReaderFunc.ReadState()
      /home/liam/go/pkg/mod/ariga.io/[email protected]/sql/migrate/migrate.go:149 +0x558
  entgo.io/ent/dialect/sql/schema.(*Atlas).planInspect()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:692 +0x45e
  ariga.io/atlas/sql/sqlite.(*inspect).InspectSchema()
      /home/liam/go/pkg/mod/ariga.io/[email protected]/sql/sqlite/driver.go:451 +0x5d0
  ariga.io/atlas/sql/sqlite.(*inspect).databases()
      /home/liam/go/pkg/mod/ariga.io/[email protected]/sql/sqlite/inspect.go:344 +0x225
  ariga.io/atlas/sql/sqlite.(*inspect).InspectSchema()
      /home/liam/go/pkg/mod/ariga.io/[email protected]/sql/sqlite/driver.go:432 +0x158
  entgo.io/ent/dialect/sql/schema.(*Atlas).planInspect()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:671 +0x32b
  entgo.io/ent/dialect/sql/schema.(*Atlas).planInspect()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:671 +0x32b
  entgo.io/ent/dialect/sql/schema.(*Atlas).create()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:622 +0x116f
  entgo.io/ent/dialect/sql.ScanOne()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/scan.go:19 +0x5c
  entgo.io/ent/dialect/sql.ScanInt64()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/scan.go:44 +0x5d
  entgo.io/ent/dialect/sql.ScanInt()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/scan.go:52 +0x31d
  entgo.io/ent/dialect/sql/schema.exist()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/migrate.go:134 +0x327
  entgo.io/ent/dialect/sql/schema.exist()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/migrate.go:130 +0x12d
  entgo.io/ent/dialect/sql/schema.exist()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/migrate.go:130 +0x12d
  entgo.io/ent/dialect/sql/schema.(*SQLite).init()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/sqlite.go:68 +0x78
  entgo.io/ent/dialect/sql/schema.(*Atlas).create()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:614 +0xdd0
  entgo.io/ent/dialect/sql.ScanInt64()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/scan.go:44 +0x5d
  entgo.io/ent/dialect/sql.ScanInt()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/scan.go:52 +0x31d
  entgo.io/ent/dialect/sql/schema.exist()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/migrate.go:134 +0x327
  entgo.io/ent/dialect/sql/schema.exist()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/migrate.go:130 +0x12d
  entgo.io/ent/dialect/sql/schema.exist()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/migrate.go:130 +0x12d
  entgo.io/ent/dialect/sql/schema.(*SQLite).init()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/sqlite.go:68 +0x78
  entgo.io/ent/dialect/sql/schema.(*Atlas).entDialect()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:1134 +0x307
  entgo.io/ent/dialect/sql/schema.(*Atlas).create()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:598 +0x9be
  entgo.io/ent/dialect/sql/schema.(*Atlas).create-fm()
      <autogenerated>:1 +0x5c
  entgo.io/ent/dialect/sql/schema.CreateFunc.Create()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/migrate.go:124 +0x5c
  entgo.io/ent/dialect/sql/schema.(*Atlas).Create()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:112 +0x1ad
  github.com/lrstanley/moroi/internal/database/ent/migrate.Create()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/database/ent/migrate/migrate.go:58 +0x1b2
  github.com/lrstanley/moroi/internal/database/ent/migrate.(*Schema).Create()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/database/ent/migrate/migrate.go:49 +0x91
  github.com/lrstanley/moroi/internal/database.Migrate()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/database/client.go:94 +0x195
  github.com/lrstanley/moroi/internal/database/schematests.NewClient()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/database/schematests/core.go:46 +0x144
  github.com/lrstanley/moroi/internal/auth_test.TestCreateAndLookupAPIKey()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/auth/apikey_test.go:42 +0x52
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:2193 +0x21c
  testing.(*T).Run.gowrap1()
      /usr/local/go/src/testing/testing.go:2258 +0x38

Goroutine 27 (running) created at:
  testing.(*T).Run()
      /usr/local/go/src/testing/testing.go:2258 +0xb12
  testing.runTests.func1()
      /usr/local/go/src/testing/testing.go:2742 +0x84
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:2193 +0x21c
  testing.runTests()
      /usr/local/go/src/testing/testing.go:2740 +0x9e9
  testing.(*M).Run()
      /usr/local/go/src/testing/testing.go:2600 +0xf44
  main.main()
      _testmain.go:82 +0x164

Goroutine 24 (running) created at:
  testing.(*T).Run()
      /usr/local/go/src/testing/testing.go:2258 +0xb12
  testing.runTests.func1()
      /usr/local/go/src/testing/testing.go:2742 +0x84
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:2193 +0x21c
  testing.runTests()
      /usr/local/go/src/testing/testing.go:2740 +0x9e9
  testing.(*M).Run()
      /usr/local/go/src/testing/testing.go:2600 +0xf44
  main.main()
      _testmain.go:82 +0x164
==================
==================
WARNING: DATA RACE
Write at 0x00000394a7c8 by goroutine 37:
  entgo.io/ent/dialect/sql/schema.(*Atlas).setupTables()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:1100 +0x7ef
  entgo.io/ent/dialect/sql/schema.(*Atlas).Create()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:107 +0x70
  github.com/lrstanley/moroi/internal/database/ent/migrate.Create()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/database/ent/migrate/migrate.go:58 +0x1b2
  github.com/lrstanley/moroi/internal/database/ent/migrate.(*Schema).Create()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/database/ent/migrate/migrate.go:49 +0x91
  github.com/lrstanley/moroi/internal/database.Migrate()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/database/client.go:94 +0x195
  github.com/lrstanley/moroi/internal/database/schematests.NewClient()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/database/schematests/core.go:46 +0x144
  github.com/lrstanley/moroi/internal/auth_test.newService()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/auth/service_test.go:19 +0x4e
  github.com/lrstanley/moroi/internal/auth_test.TestServiceClear()
      /home/liam/go/src/github.com/lrstanley/moroi/internal/auth/session_test.go:132 +0x4b
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:2193 +0x21c
  testing.(*T).Run.gowrap1()
      /usr/local/go/src/testing/testing.go:2258 +0x38

Previous read at 0x00000394a7c8 by goroutine 26:
  entgo.io/ent/dialect/sql/schema.(*Atlas).realm()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:908 +0x1512
  entgo.io/ent/dialect/sql/schema.(*Atlas).StateReader.func1()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:535 +0x616
  ariga.io/atlas/sql/migrate.StateReaderFunc.ReadState()
      /home/liam/go/pkg/mod/ariga.io/[email protected]/sql/migrate/migrate.go:149 +0x558
  entgo.io/ent/dialect/sql/schema.(*Atlas).planInspect()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:692 +0x45e
  ariga.io/atlas/sql/sqlite.(*inspect).InspectSchema()
      /home/liam/go/pkg/mod/ariga.io/[email protected]/sql/sqlite/driver.go:451 +0x5d0
  ariga.io/atlas/sql/sqlite.(*inspect).databases()
      /home/liam/go/pkg/mod/ariga.io/[email protected]/sql/sqlite/inspect.go:344 +0x225
  ariga.io/atlas/sql/sqlite.(*inspect).InspectSchema()
      /home/liam/go/pkg/mod/ariga.io/[email protected]/sql/sqlite/driver.go:432 +0x158
  entgo.io/ent/dialect/sql/schema.(*Atlas).planInspect()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:671 +0x32b
  entgo.io/ent/dialect/sql/schema.(*Atlas).planInspect()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:671 +0x32b
  entgo.io/ent/dialect/sql/schema.(*Atlas).create()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:622 +0x116f
  entgo.io/ent/dialect/sql.ScanOne()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/scan.go:19 +0x5c
  entgo.io/ent/dialect/sql.ScanInt64()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/scan.go:44 +0x5d
  entgo.io/ent/dialect/sql.ScanInt()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/scan.go:52 +0x31d
  entgo.io/ent/dialect/sql/schema.exist()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/migrate.go:134 +0x327
  entgo.io/ent/dialect/sql/schema.exist()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/migrate.go:130 +0x12d
  entgo.io/ent/dialect/sql/schema.exist()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/migrate.go:130 +0x12d
  entgo.io/ent/dialect/sql/schema.(*SQLite).init()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/sqlite.go:68 +0x78
  entgo.io/ent/dialect/sql/schema.(*Atlas).create()
      /home/liam/go/pkg/mod/entgo.io/[email protected]/dialect/sql/schema/atlas.go:614 +0xdd0
  entgo.io/ent/dialect/sql.ScanInt64()
      /home/liam/go/pkg/mod/entgo