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

Why append the database to the modules path? #104

Closed
davidwinter opened this issue Jun 17, 2013 · 2 comments
Closed

Why append the database to the modules path? #104

davidwinter opened this issue Jun 17, 2013 · 2 comments

Comments

@davidwinter
Copy link
Contributor

I don't understand why this is appending the database name to the migrations module path?

https://github.com/ruckus/ruckusing-migrations/blob/master/lib/Ruckusing/FrameworkRunner.php#L206

The migrations we use shouldn't be different per database. I want to write migrations for a module I'm using, and for those migrations to work across different databases.

Currently:

my_module/migrations/project_databasename/*.php
my_module/migrations/anotherproject_databasename/*.php

The migrations for these are identical, but currently duplicated.

Instead of:

my_module/migrations/*.php

Is this necessary? If not, can I propose we remove it? I'm happy to submit a PR.

@salimane
Copy link
Collaborator

some apps have different databases and you want to be able to group your migrations per database. In your case, if you don't want that feature, you could just use the directory parameter in config/database.inc.php . It will be empty in your case

'development' => array(
                        'type'      => 'mysql',
                        'host'      => 'localhost',
                        'port'      => 3306,
                        'database'  => 'ruckusing_migrations',
                        'user'      => 'root',
                        'password'  => '',
                        'directory' => '',
                        //'socket' => '/var/run/mysqld/mysqld.sock'
                ),

Thanks

@salimane
Copy link
Collaborator

@davidwinter please get the latest changes and report if you're still getting wrong migration directories.
Thanks

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

No branches or pull requests

2 participants