FriendsOfSymfony1 / doctrine1

[DEPRECATED -- Use Doctrine2 instead] Doctrine 1 Object Relational Mapper.
http://www.doctrine-project.org
GNU Lesser General Public License v2.1
40 stars 75 forks source link

fix: Database Migration does set current version in DB #98 #103

Open alquerci opened 10 months ago

alquerci commented 10 months ago

Start with adding tests, someone else can pick it, to provide a fix.

Depends on #90 to run tests.

Tests failed from PHP 8.0.

fixes #98

alquerci commented 7 months ago

With the patch provided on #131, I release this PR.

Sadly, the current CI does not support its execution as missing a MySQL server.

Needs to provide a MySQL server linked through socket. Or passing the DSN as environment variable.

alquerci commented 7 months ago

To make it easy to configure, I just extracted the DSN configuration from code to environment variable MYSQL_DSN.

As an example, https://github.com/FriendsOfSymfony1/doctrine1/pull/90/commits/2dbee52b3c2569889018b310555afc45ea858b1c

    environment:
      MYSQL_DSN: 'mysql:unix_socket=/var/run/mysqld/mysql.sock;dbname=test;user=root'
alquerci commented 6 months ago

I found how to add MySQL server on GitHub action.

https://github.com/FriendsOfSymfony1/doctrine1/pull/103/commits/e9068b2df92ee8c76fdddf2bd9da5da3c8db68bb

Now tests passes. :green_circle:

alquerci commented 5 months ago

@thePanz After the fix of MYSQL_DSN on https://github.com/FriendsOfSymfony1/doctrine1/pull/103/commits/4a6c6038a8754e92d19f7e4d07ebdfa7b85ae529

Tests passes.

alquerci commented 4 months ago

Rebased onto master to fix conflicts with refacto #138