spacecloud-io / mission-control

Admin UI to configure Space Cloud

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add-collection-window: Schema gets reset

ledex opened this issue · comments

When creating a collection and updating the collection name, the entire scheme-description is reset.
I guess this is due to the automatically generated skeletal structure of the type that also includes the name of the collection.

@ledex that's true. @Jayesh333 is there anything we can do about jt?

Both SQL databases and MongoDB support renaming table/collection. So on any table name change, we can instruct space cloud to rename the table/collection

@Jayesh333 i think @ledex is talking about mission control here. The schema i have put in resets when i try to change the table name. We are talking about the form in mission control.

Ooh yeah got it! That's because the schema description is derived from the table name. Since the schema description is just a string and not a JavaScript object, its difficult to play around it. Will have to manipulate the string to just change the table name somehow.

It's a bit tricky, but should be doable.

Maybe you could do it the other way around? Deriving the name of the table from the schema?

@ledex That's not really an option I think😅 because the schema field is optional whereas the table name is a required field.

Not to worry though! Have figured out how to preserve the schema structure when updating table name along with keeping the latest table name in the schema description😅

Resolved in v0.13.0