Skip to content

Commit 5556c9f

Browse files
committed
roachtest: enable create_table_with_schema_locked for ORM tests
Previously, schema_locked had to be manually set after creating objects, to make sure objects were schema_locked. We recently added the ability to create tables by default with schema_locked, which we will enable by default in our ORM tests. Informs: #129694 Release note: None
1 parent 9963ba7 commit 5556c9f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

pkg/cmd/roachtest/tests/django_blocklist.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ var enabledDjangoTests = []string{
158158

159159
// Maintain that this list is alphabetized.
160160
var djangoBlocklist = blocklist{
161+
// Schema change used by this test:
162+
// ALTER TABLE schema_author ALTER COLUMN name SET DATA TYPE STRING, ALTER COLUMN name DROP NOT NULL
163+
`schema.tests.SchemaTests.test_alter`: "ALTER COLUMN ... DROP NOT NULL is not supported in declarative schema changer (prevents from working with schema_locked)",
161164
`schema.tests.SchemaTests.test_alter_text_field_to_date_field`: "alter type requires USING",
162165
`schema.tests.SchemaTests.test_alter_text_field_to_datetime_field`: "alter type requires USING",
163166
`schema.tests.SchemaTests.test_alter_text_field_to_time_field`: "alter type requires USING",

pkg/cmd/roachtest/tests/orm_helpers.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ func alterZoneConfigAndClusterSettings(
7777
`ALTER ROLE ALL SET statement_timeout = '60s'`,
7878
`ALTER ROLE ALL SET default_transaction_isolation = 'read committed'`,
7979
`ALTER ROLE ALL SET autocommit_before_ddl = 'true'`,
80+
`ALTER ROLE ALL SET create_table_with_schema_locked='true'`,
8081
} {
8182
if _, err := db.ExecContext(ctx, cmd); err != nil {
8283
return err

0 commit comments

Comments
 (0)