You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing a Drizzle adaptor for Tableland (https://tableland.xyz) and need to implement table creation myself because Tableland doesn't yet support migrations in the way drizzle-kit does them. Getting the table config using getTableConfig has worked well and allows me to get the information I need to construct a create table... statement, except for I can't seem to access information about the columns within indexes defined in the schema. If I write the following code:
asutula
changed the title
[BUG]: Can't access table config index column information
[BUG]: Can't access table config column index information
Apr 17, 2023
If you check the column type, you'll see that it is IndexColumn, which is an alias for AnySQLiteColumn | SQL. That's because you can make indexes on SQL expressions, not just columns. So you need something like column instanceof SQLiteColumn.
What version of
drizzle-orm
are you using?0.23.11
Describe the Bug
I'm writing a Drizzle adaptor for Tableland (https://tableland.xyz) and need to implement table creation myself because Tableland doesn't yet support migrations in the way drizzle-kit does them. Getting the table config using
getTableConfig
has worked well and allows me to get the information I need to construct acreate table...
statement, except for I can't seem to access information about the columns within indexes defined in the schema. If I write the following code:the
column
value only has this_
property on it which isundefined
. I don't have access to any of the other properties ofAnySQLiteColumn
likename
.If I
console.log(column)
, I see all that information:Is there some way to get that information I'm not seeing? Thanks,
The text was updated successfully, but these errors were encountered: