-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
default value for string #638
Comments
how can I reproduce the bug? |
Try this code (with sqlite_orm 1.6): struct Contact {
int id = 0;
std::string firstName;
std::string lastName;
std::string phone;
};
using namespace sqlite_orm;
auto storage = make_storage("/tmp/test.sqlite",
make_table("contacts",
make_column("contact_id", &Contact::id, primary_key()),
make_column("first_name", &Contact::firstName, default_value <std::string> ("")),
make_column("last_name", &Contact::lastName, default_value <std::string> ("")),
make_column("phone", &Contact::phone)));
storage.sync_schema(); The error would be:
|
@TaurusAI does it reproduce in |
yes |
@TaurusAI ok thanks. I shall fix it today |
the fix is on its way #642 |
Great, thanks! |
@TaurusAI merged in |
@TaurusAI does everything work? |
Yes, dev is working now, thanks! Looking forward to 1.7 release. |
It appears sqlite only accept single quote for default string values, which requires the code below to use single quote when serializing:
The text was updated successfully, but these errors were encountered: