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

Can't refresh/reset/rollback migrations #5

Closed
Dalamar opened this issue Oct 11, 2015 · 10 comments
Closed

Can't refresh/reset/rollback migrations #5

Dalamar opened this issue Oct 11, 2015 · 10 comments
Assignees
Labels

Comments

@Dalamar
Copy link

Dalamar commented Oct 11, 2015

I get Nothing to rollback. after executing of php artisan orient:reset meanwhile the database remains untouched and all classes remains the same.

I get Nothing to rollback. after executing of php artisan orient:rollback meanwhile the database remains untouched and all classes remains the same.

I get Nothing to rollback. after executing of php artisan orient:refresh and exception

  [Sgpatil\Orientphp\Exception]
  Error: Unable to create Class

meanwhile the database remains untouched and all classes remains the same.

@sgpatil sgpatil added the bug label Oct 20, 2015
@DJWassink
Copy link

On a local test all these methods seem to result in the exception being thrown. (I did rename the batch from #6 to number, which did seem to fix the migration table.)

It also seems like the content of the request of the exception reveals a bit more about this issue. The error returned by Orient is "java.lang.IllegalArgumentException: Class '****' already exists" so it seems like a drop of a table is actually resulting in a create.

@sgpatil
Copy link
Owner

sgpatil commented Oct 30, 2015

Hi @DJWassink , yes you are right. The drop method is always calling create class method

@sgpatil sgpatil self-assigned this Oct 30, 2015
@sgpatil
Copy link
Owner

sgpatil commented Oct 30, 2015

The problem has been solved. Try the updated code and inform

@Dalamar
Copy link
Author

Dalamar commented Oct 30, 2015

php artisan orient:rollback
php artisan orient:reset

They both updates migrations table but they don't delete the schemas that were created during the migration being reseting/rolling back.

php artisan orient:refresh
Retuns:

Rolled back: 2015_10_28_191606_create_countries_table
Nothing to rollback.
  [Sgpatil\Orientphp\Exception]
  Error: Unable to create Class

As the result, migration table is empty but all tables that were created during migrations remain in DB.

@Dalamar
Copy link
Author

Dalamar commented Oct 30, 2015

BTW which version of OrientDB do you guys use to test this driver?

@sgpatil
Copy link
Owner

sgpatil commented Oct 30, 2015

I am using orientdb community 2.0 M1

@sgpatil
Copy link
Owner

sgpatil commented Oct 30, 2015

Sorry @Dalamar , I just forgot to push changes of orientdb-php . Can you please recheck it using updated code once again.

@Dalamar
Copy link
Author

Dalamar commented Oct 30, 2015

Great!
Thanks for quick resolving.
Confirm. Now it works.

@Dalamar
Copy link
Author

Dalamar commented Oct 30, 2015

I use following versions for Mac OS X:

  1. OrientDB 2.1 Enterprise edition
  2. OrientDB 2.2 alpha (from download page)
  3. OrientDB 2.2 alpha nightly builds

OrientDB 2.2 alpha (from download page) works fine with column name 'batch' in migrations table.
All other versions I use blaming on the 'batch' property and do not create migration records.

@sgpatil
Copy link
Owner

sgpatil commented Nov 25, 2015

Closing the issue as it is fixed. Please let me know if you find any problem.

@sgpatil sgpatil closed this as completed Nov 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants