refinery icon indicating copy to clipboard operation
refinery copied to clipboard

Allow 64bit migration versions

Open ankhers opened this issue 4 years ago • 9 comments

This should allow the versions to be parsed and inserted into the database.

I still need to add a command to the CLI to generate a migration for each supported database.

fixes #83

ankhers avatar Feb 04 '21 02:02 ankhers

I'm not really sure what the best command name to generate the migration. I'm open to suggestions if anyone has any.

ankhers avatar Feb 15 '21 01:02 ankhers

Hi, and thanks for starting this. I would suggest update-schema?

jxs avatar Feb 16 '21 19:02 jxs

So, I have been thinking about the auto generated migration and I am wondering whether this is something we want to do. Some people will prefer to have their migrations written in rust, others will prefer sql. Even then, there is the difference between versioned and unversioned migrations. Should we just have the ability to generate all of these different types of migrations, or should there just be a note in the changelog and readme stating to migrate the table?

ankhers avatar Feb 22 '21 15:02 ankhers

Or maybe instead of creating a migration, we could just have refinery take care of it? Similar to how refinery will automatically create the schema table for you.

ankhers avatar Feb 22 '21 15:02 ankhers

Or maybe instead of creating a migration, we could just have refinery take care of it? Similar to how refinery will automatically create the schema table for you.

can that be done with sql standard? If so yeah definitely, thanks!

jxs avatar Feb 28 '21 13:02 jxs

So this is the functionality that you would like the keep? How would I go about applying the "older" migrations?

ankhers avatar Mar 10 '21 19:03 ankhers

sorry, did not understand the question. How does this affect older migrations?

jxs avatar Mar 17 '21 12:03 jxs

Really sorry about this. I don't really understand how I managed it, but I meant to reply to the most recent comment on #83. Let me repost question there just so that everything is clear.

ankhers avatar Mar 17 '21 14:03 ankhers

ON 32 bit systems this should fallback to characters, or should these longer 'version' number schemes just be character/String consistently.

I also wonder if we wouldn't have less headaches on smaller platforms if we just used usize and fall back to char/String when the versions number is 'too-big' for the system refinery is running on?

taqtiqa-mark avatar May 17 '22 21:05 taqtiqa-mark

ON 32 bit systems this should fallback to characters, or should these longer 'version' number schemes just be character/String consistently.

Bitness should not matter as long as the database supports INT8, which seems like a reasonable baseline requirement to be usable as a database anyway.

I'm super excited about this change because I just wrote unfortunate code that puts a Unix epoch time into the version number.

lf- avatar Oct 04 '22 19:10 lf-

Actually, since Refinery checksums are 64 bits, it already requires that the DB can store a 64 bit integer.

lf- avatar Oct 04 '22 19:10 lf-

going to close this out of lack of activity, feel free to re-open if you or anyone wants to work on this again. Thanks!

jxs avatar Sep 13 '23 17:09 jxs

@jxs What's missing for this to be merged?

Would a feature flag be an acceptable solution to not risk breaking any existing dependent code out there?

mbrgm avatar Jan 18 '24 23:01 mbrgm

Hi @mbrgm this PR was stale for more than a year before being closed, so I don't know what was missing and how would this PR be compatible with the current codebase but feel free to fork the branch and work on the feature, if you want any guidance ping me. Cheers :)

jxs avatar Jan 21 '24 21:01 jxs