mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
examples: use AutoApprove in 'atlas schema apply' examples (#4366)
This commit is contained in:
@@ -37,8 +37,9 @@ func TestCompositeTypes(t *testing.T) {
|
||||
_, err = ac.SchemaApply(ctx, &atlasexec.SchemaApplyParams{
|
||||
// URL to your database. For example:
|
||||
// postgres://postgres:pass@localhost:5432/database?search_path=public&sslmode=disable
|
||||
URL: os.Getenv("DB_URL"),
|
||||
Env: "local",
|
||||
URL: os.Getenv("DB_URL"),
|
||||
Env: "local",
|
||||
AutoApprove: true,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
t.Cleanup(func() { client.User.Delete().ExecX(ctx) })
|
||||
|
||||
@@ -35,8 +35,9 @@ func TestDomainTypes(t *testing.T) {
|
||||
_, err = ac.SchemaApply(ctx, &atlasexec.SchemaApplyParams{
|
||||
// URL to your database. For example:
|
||||
// postgres://postgres:pass@localhost:5432/database?search_path=public&sslmode=disable
|
||||
URL: os.Getenv("DB_URL"),
|
||||
Env: "local",
|
||||
URL: os.Getenv("DB_URL"),
|
||||
Env: "local",
|
||||
AutoApprove: true,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
t.Cleanup(func() { client.User.Delete().ExecX(ctx) })
|
||||
|
||||
@@ -37,8 +37,9 @@ func TestEnumTypes(t *testing.T) {
|
||||
_, err = ac.SchemaApply(ctx, &atlasexec.SchemaApplyParams{
|
||||
// URL to your database. For example:
|
||||
// postgres://postgres:pass@localhost:5432/database?search_path=public&sslmode=disable
|
||||
URL: os.Getenv("DB_URL"),
|
||||
Env: "local",
|
||||
URL: os.Getenv("DB_URL"),
|
||||
Env: "local",
|
||||
AutoApprove: true,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
t.Cleanup(func() { client.User.Delete().ExecX(ctx) })
|
||||
|
||||
@@ -38,8 +38,9 @@ func TestTriggersTypes(t *testing.T) {
|
||||
_, err = ac.SchemaApply(ctx, &atlasexec.SchemaApplyParams{
|
||||
// URL to your database. For example:
|
||||
// postgres://postgres:pass@localhost:5432/database?search_path=public&sslmode=disable
|
||||
URL: os.Getenv("DB_URL"),
|
||||
Env: "local",
|
||||
URL: os.Getenv("DB_URL"),
|
||||
Env: "local",
|
||||
AutoApprove: true,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ replace entgo.io/ent => ../
|
||||
|
||||
require (
|
||||
ariga.io/atlas v0.32.1-0.20250325101103-175b25e1c1b9
|
||||
ariga.io/atlas-go-sdk v0.5.6
|
||||
ariga.io/atlas-go-sdk v0.6.9
|
||||
entgo.io/ent v0.0.0-00010101000000-000000000000
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/lib/pq v1.10.7
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
ariga.io/atlas v0.32.1-0.20250325101103-175b25e1c1b9 h1:E0wvcUXTkgyN4wy4LGtNzMNGMytJN8afmIWXJVMi4cc=
|
||||
ariga.io/atlas v0.32.1-0.20250325101103-175b25e1c1b9/go.mod h1:Oe1xWPuu5q9LzyrWfbZmEZxFYeu4BHTyzfjeW2aZp/w=
|
||||
ariga.io/atlas-go-sdk v0.5.6 h1:7Hb5AyvrCeVZpQeHVqn6PbdEBm/YocgSCL4UafE2Les=
|
||||
ariga.io/atlas-go-sdk v0.5.6/go.mod h1:9Q+/04PVyJHUse1lEE9Kp6E18xj/6mIzaUTcWYSjSnQ=
|
||||
ariga.io/atlas-go-sdk v0.6.9 h1:G5OajpcSIrLRMz8VfmMdfkNptlGstiK0zQ0dtuZWBaE=
|
||||
ariga.io/atlas-go-sdk v0.6.9/go.mod h1:cFq7bnvHgKTWHCsU46mtkGxdl41rx2o7SjaLoh6cO8M=
|
||||
bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8=
|
||||
bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM=
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
|
||||
@@ -41,8 +41,9 @@ func TestRowLevelSecurity(t *testing.T) {
|
||||
_, err = ac.SchemaApply(ctx, &atlasexec.SchemaApplyParams{
|
||||
// URL to your database. For example:
|
||||
// postgres://postgres:pass@localhost:5432/database?search_path=public&sslmode=disable
|
||||
URL: os.Getenv("ATLAS_URL"),
|
||||
Env: "local",
|
||||
URL: os.Getenv("ATLAS_URL"),
|
||||
Env: "local",
|
||||
AutoApprove: true,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
t.Cleanup(func() {
|
||||
|
||||
@@ -37,8 +37,9 @@ func TestTriggers(t *testing.T) {
|
||||
_, err = ac.SchemaApply(ctx, &atlasexec.SchemaApplyParams{
|
||||
// URL to your database. For example:
|
||||
// postgres://postgres:pass@localhost:5432/database?search_path=public&sslmode=disable
|
||||
URL: os.Getenv("DB_URL"),
|
||||
Env: "local",
|
||||
URL: os.Getenv("DB_URL"),
|
||||
Env: "local",
|
||||
AutoApprove: true,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
t.Cleanup(func() {
|
||||
|
||||
@@ -37,8 +37,9 @@ func TestViews(t *testing.T) {
|
||||
_, err = ac.SchemaApply(ctx, &atlasexec.SchemaApplyParams{
|
||||
// URL to your database. For example:
|
||||
// postgres://postgres:pass@localhost:5432/database?search_path=public&sslmode=disable
|
||||
URL: os.Getenv("DB_URL"),
|
||||
Env: "local",
|
||||
URL: os.Getenv("DB_URL"),
|
||||
Env: "local",
|
||||
AutoApprove: true,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
t.Cleanup(func() {
|
||||
|
||||
@@ -37,8 +37,9 @@ func TestViews(t *testing.T) {
|
||||
_, err = ac.SchemaApply(ctx, &atlasexec.SchemaApplyParams{
|
||||
// URL to your database. For example:
|
||||
// postgres://postgres:pass@localhost:5432/database?search_path=public&sslmode=disable
|
||||
URL: os.Getenv("DB_URL"),
|
||||
Env: "local",
|
||||
URL: os.Getenv("DB_URL"),
|
||||
Env: "local",
|
||||
AutoApprove: true,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
t.Cleanup(func() {
|
||||
|
||||
Reference in New Issue
Block a user