meta-environment icon indicating copy to clipboard operation
meta-environment copied to clipboard

Differences in database dump from new installs.

Open dhruvkb opened this issue 4 years ago • 3 comments

Since new installations of meta-environment using VVV install newer versions of Ubuntu, MariaDB and mysqldump, taking a fresh database export gives a different output. For example, importing the file

meta-environment/wordpressorg.test/provision/wordpressorg_dev.sql

and exporting using mysqldump produces lots of insignificant differences:

  1. The metadata at the top is different. Eg:
--- MySQL dump 10.16  Distrib 10.1.44-MariaDB, for debian-linux-gnu (x86_64)
+-- MariaDB dump 10.19  Distrib 10.4.19-MariaDB, for debian-linux-gnu (x86_64)
 --
 -- Host: localhost    Database: wordpressorg_dev
 -- ------------------------------------------------------
--- Server version      10.1.44-MariaDB-0ubuntu0.18.04.1
+-- Server version      10.4.19-MariaDB-1:10.4.19+maria~bionic
  1. Numbers are not quoted in the new export. Eg:
-  `user_id` int(10) NOT NULL DEFAULT '0',
+  `user_id` int(10) NOT NULL DEFAULT 0,
  1. DEFAULT NULL is added to some columns. Eg:
-  `description` text,
+  `description` text DEFAULT NULL,

What's the recommended way to proceed?

dhruvkb avatar May 24 '21 06:05 dhruvkb

Is this causing problems? I'm unsure what the action to take is here or the concern.

tomjn avatar May 24 '21 08:05 tomjn

I'm about to make a PR that creates a new site under wordpressorg.test/ and wanted to confirm if these changes (which will be present in the PR) are okay to commit as a part of the new database dump.

dhruvkb avatar May 24 '21 08:05 dhruvkb

Related:

  • https://github.com/WordPress/meta-environment/wiki/Reviewing-PRs-with-database-changes - this is probably a bit too extreme in hindsight. These days I'd probably just merge it as long as there aren't extraneous things like test posts, etc
  • #141

In general they're fine as long as they're intentional and don't mess up other sites.

iandunn avatar May 24 '21 18:05 iandunn