Skip to content

Releases: OwenMelbz/forget-db

PHP 7.4 Bug fix

16 Jul 09:37
Compare
Choose a tag to compare

Updates internally used packages to prevent any implode related PHP errors.

PHP 7.4 + Laravel 6 Support

02 Jan 16:05
Compare
Choose a tag to compare

This is a non-breaking change for users, however any developers will find internally dependencies and packages have changed which has bought deprecation errors.

I've increased to version 1.0.0 for clarity.

Dry run! (sort of)

25 Jun 12:06
Compare
Choose a tag to compare

We've added a new --dry flag to the CLI.

This means you can now see what queries your config file will run, to check the conditions are correct, it also gives you a table representation of your dataset to check it looks like what you expected.

e.g

🧠  forget-db :: 2 rows found to process.
🧠  forget-db :: Query run... select `users`.`id`, `users`.`email`, `users`.`password` from `users`

+----+-------------------------+------------------+
| id | email                   | password         |
+----+-------------------------+------------------+
| 1  | [email protected]  | 371817583255573  |
| 2  | [email protected] | 6011543368953199 |
+----+-------------------------+------------------+

--

What it doesn't do is

  • Give you what the data will look like AFTER you run it
  • Give you the update commands it will run

Warning - When doing a dry run, remember that it will output to your terminal, so if you are exposing sensitive data make sure you're taking the correct precautions!

--

This is primarily designed for you to check that your conditions all work as expected before running it on your data set.

You can use it similarly to forget-db forget ./config.yml --dry this will put it into dry run mode, you can see more information within the readme https://github.com/OwenMelbz/forget-db#dry-run

Bug fix for conditions not applying to correct columns

25 Jun 11:56
Compare
Choose a tag to compare

Occasionally when the column name, started with the letters contained within keywords for conditions, it would also strip these out.

e.g

conditions: where email = [email protected]

as where contains an e and email starts with an e it would turn it into

where mail = [email protected] removing the first e

Added support for join tables

24 Jun 16:34
Compare
Choose a tag to compare

This is just a minor update which adds the ability to use join tables which is useful for applying conditions which use information in other tables e.g.

addresses:
  conditions: users.id = 1
  joins: users on users.id = address.user_id;

To get the update just run forget-db update

Added the ability to load .env files for preloading database credentials

30 May 19:44
Compare
Choose a tag to compare

After some discussion, it's been decided to add partial .env support.

This means if you have a laravel style .env file within the current working directory, you'll get offered the chance to load the database credentials from it - speeding up the repetitive attempts.

The supported options are

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=my_database
DB_USERNAME=root
DB_PASSWORD=password
DB_PREFIX=wp_

Added the ability to flag fields as being unique

30 May 12:52
Compare
Choose a tag to compare

Recently people have been using this to purge large datasets and have found a little bug!

That being there is a chance you will hit duplicate constraints on your database, this adds the ability to use modifiers to field names

e.g if you previously had

members:
    columns:
        member_email: email

You might have had duplicate issues, now you can prefix your faker property with unique: to make it unique.

members:
    columns:
        member_email: unique:email

This also gives us the abilit down the line for more modifiers :)

Updater released!

26 May 21:16
Compare
Choose a tag to compare

It seems all was good in the world, the updater is okay!

I think this counts as a full RC!

Now with self-updater!

26 May 19:30
Compare
Choose a tag to compare

Hopefully this works out okay :)

I've just added an update command forget-db update which should pull in the latest version, but to fully test I need to try it out! so fingers crossed!

Beta released

26 May 18:13
Compare
Choose a tag to compare

This is my first release, so please any feedback is welcome, and don't shout if there's too many bugs!

Soon there will be a version with a self-updater so fixing these will be easier :)