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 want to reuse the same schema.hcl for a local sqlite database and for a prod mysql database; in the config file, there's corresponding "local" and "prod" envs. I'd like to adapt some column types depending on the env. I wanted to do something like:
variable"id_key_type" {
type=stringdescription="The name of the tenant (schema) to create"
}
table"foo" {
schema=schema.maincolumn"id" {
type=var.id_key_typeauto_increment=true
}
}
But it doesn't seem like I can access variables when specifying a column type?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I want to reuse the same schema.hcl for a local sqlite database and for a prod mysql database; in the config file, there's corresponding "local" and "prod" envs. I'd like to adapt some column types depending on the env. I wanted to do something like:
But it doesn't seem like I can access variables when specifying a column type?
Beta Was this translation helpful? Give feedback.
All reactions