-
-
Notifications
You must be signed in to change notification settings - Fork 711
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
[Mysql]: Added defaultCurrentTimestamp and onUpdateCurrentTimestamp to datetime #1114
base: beta
Are you sure you want to change the base?
Conversation
…o datetime - The method defaultNow() has been deprecated in favor of defaultCurrentTimestamp - The method onUpdateNow() has been deprecated in favor of onUpdateCurrentTimestamp
this needs merging :( |
When will this be released? And will the functions accept and FSP param? |
@Angelelz I guess this PR should be merged to beta branch instead of main. @AndriiSherman can you check this out and ensure it is added to the next release? It seems almost finished. :D |
This PR will probably also close #624. |
Need merge. |
any updates on merging this PR? looks really useful and checks on it are passing |
I was about to open an issue regarding this exact thing. This implementation reflects a widespread common declaration pattern when implementing timestamp fields. I would like to urge a merge at the earliest possible convenience. |
well all changes seem approved and checks are passing let's hope they merge it soon! @aretrace |
The changes were made in
date.common.ts
due to the code that can be shared betweentimestamp
anddatetime
data types in Mysql.fsp
config parameter was added toMysqlDateColumnBaseConfig
class. This will be helpful for Drizzle-kit to be able to add to correct fsp configuration toON UPDATE
. See hereUsers can now use the these methods in their schema definition as follows:
This PR will close drizzle-team/drizzle-kit-mirror#596 and #921