Closed asutula closed 4 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
studio | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 3, 2024 11:27pm |
Oops @joewagner I had commented the PR, but forgot to submit the review. I just did, so you can read my comments now if you're interested at all. Sorry about that.
There is a Tableland quirk where, if you create an
Integer
column with aprimary key
constraint, it ends up also with anautoincrement
modifier once it is materialized on Tableland. We can't specify theautoincrement
part ofinteger primary key autoincrement
in ourcreate
statement or else we get a syntax error... But when we ask the validator for information about a table, while importing a table, for example,integer primary key autoincrement
is the constraint information that comes back.This PR correctly deals with this situation for
Schema
data that is created by Studio and hasn't been deployed to Tableland as well asScheama
s that are imported from existing Tableland tables. It provides informative UI so the user understands what is going on.Create table definition view when a non-integer column is configured:
Create table definition when an integer column is configured:
Create table definition when an integer column is configured and you mouse over the icon:
Table definition component using an icon to show the PK is auto-increment:
Hover state of table definition component using an icon to show the PK is auto-increment: