database

Update CI data / database container image for data or database schema changes.

One of the projects I work on uses GitLab . We host our codes on GitLab, review codes and commits, and use GitLab CI to do all the CI auto-testing jobs before we merge branches.

Normally mock data for TDD Unit Test shouldn't be a difficult job, but once we need to do something more complicated, like searching relations in a graph database, or doing some Integration Test, it became a mess, no matter we put them in test codes or put them in separated files and load when needed:

  • updating hundreds of records in a thousands-rows mock dataset .
  • container stats and changes will not be kept across stages and jobs, so in every jobs and stages we need to load them again and again.
  • it takes time and resources to load data into database, and we don't want to wait them long.
  • wasting resources might cause global warming.

Reset password and unblock login for admin (or any account) in Drupal 8 with SQL query in MySQL or MariaDB

My Drupal 8 site got some problem and I restored it from an old backup.
The problem is, I forgot the password of admin account, and I don't have a working MTA (ex, Postfix Mail Transport Agent) on the server for sending password resetting mail.
The solutions to reset password and unblock the account in database directly.

Hope this HOWTO can save a tree and a kitten.

Subscribe to RSS - database