Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

h4cc_alice_fixtures:load:files trunkates migration_versions table #48

Open
cosma opened this issue Jun 25, 2015 · 4 comments
Open

h4cc_alice_fixtures:load:files trunkates migration_versions table #48

cosma opened this issue Jun 25, 2015 · 4 comments

Comments

@cosma
Copy link

cosma commented Jun 25, 2015

the command h4cc_alice_fixtures:load:files --drop should not truncate the doctrine migrations table(default is migration_versions ), if there's any .

@cosma cosma changed the title h4cc_alice_fixtures:load:files trunkates migration_versions h4cc_alice_fixtures:load:files trunkates migration_versions table Jun 25, 2015
@h4cc
Copy link
Owner

h4cc commented Jun 25, 2015

There is no truncating. The whole table will be removed and recreated.

Currently, the Schema is dropped by removing all tables from database:
https://github.com/h4cc/AliceFixturesBundle/blob/master/ORM/DoctrineORMSchemaTool.php#L45

Maybe this could be changed to use this method in the schema tool:
https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/SchemaTool.php#L719

@cosma
Copy link
Author

cosma commented Jun 26, 2015

You are right, the default behaviour is drop ans recreate. Sorry for confusing you, in my app I changed the default behaviour to truncate, as being faster. DB update is kept by doctrine migrations.

The main idea is that command shouldn't drop/truncate the doctrine migration table, if there's one.

@h4cc
Copy link
Owner

h4cc commented Jun 26, 2015

Looks like a different ORM\DropStrategy to me. Something not yet existing.

Have you seen Alice v2.0 is out? I am thinking about upgrading this bundle to that version.

@cosma
Copy link
Author

cosma commented Jun 26, 2015

Now I know. :-)

I guess my idea will introduce a dependency to doctrine migrations bundle ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants