Skip to content

Breaking publish with new column and new index results in failure #3441

@egormanga

Description

@egormanga

Publishing a breaking module update when adding both a new column and an index on a different column in a single table fails with a TableError.

Reproduction, starting with the sample module:

 pub struct Person {
+    #[index(btree)]
     name: String,
+    #[default(0)]
+    test: u32,
 }
▸ Created column in table person
    + test: U32 (default: U32(
    0,
))
▸ Created index person_name_idx_btree on [name] of table person
!!! Warning: All clients will be disconnected due to breaking schema changes

The above changes will BREAK existing clients. Do you want to proceed? [y/N]y
Publishing module...
Error: Failed to create or update the database: DatastoreError: TableError: Table with ID `4096` not found in `TxState`.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions