Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lucky gen.model missing datatypes #1311

Closed
watzon opened this issue Nov 15, 2020 · 1 comment · Fixed by #1375
Closed

lucky gen.model missing datatypes #1311

watzon opened this issue Nov 15, 2020 · 1 comment · Fixed by #1375
Assignees

Comments

@watzon
Copy link

watzon commented Nov 15, 2020

Don't know if this belongs here or in Avram, feel free to move it. When running lucky gen.model Media asset_data:JSON::Any I get the error:

Unable to generate model Media, the following columns are using types not supported by the generator:

  asset_data:JSON::Any


The supported types are Bool, Float64, Int16, Int32, Int64, String, Time, UUID

For more complex types that can be added to your migrations manually, see https://luckyframework.org/guides/database/migrations#add-column for more details.

When visiting the link though it clearly shows JSON::Any as an acceptable type

@jwoertink jwoertink transferred this issue from luckyframework/lucky_cli Nov 16, 2020
@jwoertink
Copy link
Member

This is a tricky one. Originally that task couldn't support generating JSON::Any, so we had a special error to catch that https://github.com/luckyframework/lucky/blob/master/spec/tasks/gen/model_spec.cr#L80 but then we added this new error to catch for some other things. Now I think we may be able to support JSON::Any in the generator, and it just needs to be added here https://github.com/luckyframework/lucky/blob/master/tasks/gen/mixins/migration_with_columns.cr#L2... 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants