0

As a part of mariadb instance (Container) upgarde i need to create some new tables. So i have copied the update.sql script in /docker-entrypoint-initdb.d , but when i do the upgrade, this is not getting called.

Same thing works when I do a fresh instance creation.

  • yes, that is expected as mentioned in the docs. init will runs once , to update the DB the " /docker-entrypoint-initdb.d" is not the correct place – LinPy Oct 16 '19 at 10:59
  • 1
    You need to attach some sort of migration system to your application. You can use it to create the initial table layout too. – David Maze Oct 16 '19 at 11:01
  • I feel that this is a very generic usecase where in version 0.1.0 of mariadb instance we create sy 2 tables. Then when we plan to upgrade to version 0.2.0 of mariadb inatsnce we need to created new 3 more tables. How this can be achieved. – Gaurav Mittal Oct 16 '19 at 11:23

0 Answers0