loco icon indicating copy to clipboard operation
loco copied to clipboard

Fix truncate not actually truncating

Open Ken-vdE opened this issue 3 months ago • 4 comments

This fixes an issue that causes postgres database to not actually truncate, so Id column auto-increment does not get reset to 1 and new models continue to use Id from existing increment. This truncate query is actually faster and this fixes an issue where some tests fail (when using postgres db) because snapshot thinks new entities should have Id 1 when they do not.

Now, I'm very new to both Rust and Loco, so please inspect this code carefully and make sure I haven't done anything stupid.

Ken-vdE avatar Oct 26 '24 12:10 Ken-vdE