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

default is not setting default value in MySQL #31

Closed
TylerDev6 opened this issue Sep 16, 2016 · 5 comments
Closed

default is not setting default value in MySQL #31

TylerDev6 opened this issue Sep 16, 2016 · 5 comments
Labels

Comments

@TylerDev6
Copy link

@column({ default: "initialized" })
public status: string;

This annotation in my class is returning the following in the SQL:

status varchar(255) NOT NULL,

@pleerock
Copy link
Member

I have significantly refactored schema creation (including default value update) in the latest changes, but I didn't release a new version yet. Planning to release it next week, are you okay to wait for it?

@TylerDev6
Copy link
Author

Yes, of course :) I just pre-populated my test data for now

@MichalLytek
Copy link
Contributor

MichalLytek commented Sep 29, 2016

I have the bc8b604 version compiled but the issue still exist. Have you repaired this or only "TODO" in future?

Also the @Index({ unique: true }) doesn't create UNIQUE when using as property decorator, only as class decorator.
EDIT: The @Column({ unique: true }) works ok, so there's a workaround.

@pleerock
Copy link
Member

I'll check it again

@pleerock pleerock added the bug label Oct 9, 2016
pleerock pushed a commit that referenced this issue Dec 2, 2016
@pleerock
Copy link
Member

pleerock commented Dec 2, 2016

fixed in 0.0.3-alpha.15, feel free to reopen it if it still something not working

@pleerock pleerock closed this as completed Dec 2, 2016
pleerock pushed a commit that referenced this issue Sep 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants