-
-
Notifications
You must be signed in to change notification settings - Fork 296
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
scaffold controller tiny_int type not match #1219
Comments
i have add pr:#1220 |
Thank you for opening this issue and fixing the PR! However, we’ve decided to remove support for tiny_* due to differences in seam types between PostgreSQL and SQLite:
Let us know if you have any further questions or concerns. |
i have three ways to solve this problem.
i have finished 1st solution. it does work.
|
there are many special column types scaffold can not reach to their development speed, let developer manage those, scaffold just need to manage the minimal common types |
I agree, this is the reason we decided to remove some of them. |
Description
tiny_int type not match with scaffold's controller result.
To Reproduce
loco new
✔ ❯ App name? · myapp
✔ ❯ What would you like to build? · Saas App with client side rendering
✔ ❯ Select a DB Provider · Sqlite
✔ ❯ Select your background worker type · Async (in-process tokio async tasks)
cd myapp
cargo loco generate scaffold demo_tiny name:string count:int is_enabled:tiny_int --api
cargo build
Compiling myapp v0.1.0 (/Users/chaos/rustworkspace/myapp)
error[E0308]: mismatched types
--> src/controllers/demo_tiny.rs:21:29
|
21 | item.is_enabled = Set(self.is_enabled.clone());
| --- ^^^^^^^^^^^^^^^^^^^^^^^ expected
Option<i8>
, foundOption<i16>
| |
| arguments to this function are incorrect
Expected Behavior
./myapp/src/controllers/demo_tiny.rs#Params field is_enabled should be match with ./myapp/src/models/_entities/demo_tinies.rs Model field is_enabled type
build pass
Environment:
macos
rust 1.86.0-nightly
Additional Context
The text was updated successfully, but these errors were encountered: