This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

noideawhattotypehere
noideawhattotypehere

Hi there,

Im currently using build 431 - actual stable one. I am developing a new plugin for my personal project, but something strange is happening. I have created my migrations, updated version.yaml

1.0.1:

  • Something
  • create_my1_table.php

1.0.2:

  • Something
  • create_my11_table.php

1.0.3:

  • Something
  • create_my111_table.php

1.0.4:

  • Something
  • create_my1111_table.php

1.0.5:

  • Something
  • create_my11111_table.php

1.1.0: Permissions

Ive changed the script names but you get the idea - now here comes the bug, whenever i run plugin:refresh from CLI, the plugin refreshes, runs every script that is in my version.yaml file, but system_plugin_version table lists my plugin as 1.0.4 version - which causes next refresh to fail since my tables are not being dropped down from last migration. If i manually remove the table created in create_my11111_table.php and run october:up - it updates everything correctly, but after plugin:refresh it stops again at 1.0.4

Please note that I've checked my migrations and they are correct, no code errors or anything. If i remove 1.0.5 then it stops at 1.0.3 after refresh. Seems like a bug but I'd love to hear if anyone had the same problem.

Last updated

noideawhattotypehere
noideawhattotypehere

Nevermind, i had an \DB::unprepared(...) after Schema::create for ugly but fast seeding, removing it helped, guess i have to use built in Seeder

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.