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

Undefined property errors when migrating from 3.1.6 #581

Closed
mniemela opened this issue May 21, 2020 · 5 comments · Fixed by #582
Closed

Undefined property errors when migrating from 3.1.6 #581

mniemela opened this issue May 21, 2020 · 5 comments · Fixed by #582
Assignees

Comments

@mniemela
Copy link

Detailed description of the problem [REQUIRED]

I attempted to migrate Lychee from old 3.1.6 version to 4.0.5

Steps to reproduce the issue

Steps to reproduce the behavior:

  1. Prepare migration as instructed in the migration guide
  2. Run command "php artisan migrate"
  3. Following errors happen, apparently because the old database didn't have those columns? I had to manually set a constant to them, which enabled the migration to proceed until next error, until they were all dealt with.

Errors

`In 2018_08_15_102039_move_albums.php line 31:

Undefined property: stdClass::$license

In 2018_08_15_103716_move_photos.php line 50:

Undefined property: stdClass::$lens

In 2018_08_15_103716_move_photos.php line 81:

Undefined property: stdClass::$license
`

Output of the diagnostics [REQUIRED]

Not applicable, as this is an issue with the migration scripts.

@d7415
Copy link
Contributor

d7415 commented May 21, 2020

Yes, lens was added in 3.2.3, licenses in 3.2.5. I'll let @ildyria decide whether we want to support upgrades from older versions or require 3.2.16 first.

@ildyria
Copy link
Member

ildyria commented May 21, 2020

@mniemela can you have a look at #582, if you have not added pictures and not deleted your v3 database. :)

@phil-w
Copy link

phil-w commented May 21, 2020

I'm also looking at moving from 3.1.6. I assume that fix is in the next release, not 4.0.5 (can't work that out from the thread, not my area).

(None of this is technology I'm hugely familiar with. I don't suppose I'll have the "artisan" thing. There are a bunch of migration scripts in the database/migrations directory which I suppose I can try to run, to get to this error).

@ildyria
Copy link
Member

ildyria commented May 21, 2020

Hi phil,

I'm also looking at moving from 3.1.6. I assume that fix is in the next release, not 4.0.5 (can't work that out from the thread, not my area).

Indeed you will have to wait for 4.0.6 which may be sooner that expected with all those PR coming in.

(None of this is technology I'm hugely familiar with. I don't suppose I'll have the "artisan" thing. There are a bunch of migration scripts in the database/migrations directory which I suppose I can try to run, to get to this error).

No worries, artisan is actually provided by Lychee, so no worries on that one. "migration" just means update the database to lastest version. If your database is empty, it will set it up.

Also if you are worries about scripts etc. Don't there is also an installer included which will start as soon as you open the public directory with a web browser.

If you have any questions, feel free to open new issues or ping on on gitter: https://gitter.im/LycheeOrg/Lobby

@mniemela
Copy link
Author

@ildyria, I still had a VM snapshot from before I did the migration, so I tested it and it did work fine now.

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

Successfully merging a pull request may close this issue.

4 participants