luckyframework / luckyframework/avram

Add database cleaning with transaction

Open
#36 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Crystal
Stars
183
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Right now you can clean the database with truncation: https://github.com/luckyframework/lucky_record/pull/137

The problem is it is super slow. Transactions are much faster, so transaction cleaning should be added.

It may be helpful to see how DatabaseCleaner did it: https://github.com/DatabaseCleaner/database_cleaner/blob/master/lib/database_cleaner/active_record/transaction.rb

Contributor guide

Open the contributing guide

Research direction

Review the truncation approach referenced in lucky_record pull request 137 and compare it with DatabaseCleaner's active_record/transaction.rb example. Then locate Avram's database-cleaning entry point and add transaction cleaning alongside truncation; done means callers can use the transaction strategy for faster database cleaning.

Written by the indexing model from the issue text.

Assessment

Tech stack
crystal, postgresql
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.