Laravel remembering old migration - migration

I have a migration file that has errors, so I tried to fix the errors but nothing changes. I even deleted the whole file and it still tries to run the invalid migration
Steps I tried:
deleted all tables in database
Ran composer dump-autoload
Ran php artisan optimize:clear
Ran php artisan config:clear (even though the above does that too)
Tried making a brand new migration, that doesn't run either. Tried renaming the old one, that doesn't work
Nothing I do works, it continues to run the old migration file with the same error...

Related

I'm having trouble with extended entities

This question is related to I need help upgrading OroCommerce to 4.1.1.
I'm getting several errors related to extended entities... I believe there must be something wrong with cache building but I can't find the root cause (nor a solution :( ).
I checked the db structure in my production server against the VM where everything is working just fine and I can't see any significant difference (meaning the new fields such as digitalAsset_id for oro_attachment_file table or wysiwyg for oro_fallback_localization_val are there).
I just run an extra php bin/console oro:migration:load --force -e prod it didn't make a difference...
Edit:
Just checked the differences in the var/cache directory of both installations and in fact I see that the VM version has the methods that are missing from the prod one.
I uploaded the working code into the production server and re run the platform upgrade but I'm still running into issues.
In case oro:migration:load command (or oro:platform:update that actually triggers migration load) failed for the first time, you have to:
fix errors,
restore from the database dump
and run the command again.
Otherwise, there could be migrations that end up with errors,
but on the second run, they are not executed again, which could lead to the mess with the database schema, entity metadata, or entity config.
Also oro:migration:load command is not self-sufficient. There could be a need to warm up some entity configuration after the schema change. Please, try to run oro:platform:update, even if all the migrations are already executed, it would try to warm up all the caches and could fix an error.

Get error in Lumen database migration after delete migration file manually

Below is the step that I followed.
php artisan migrate:install
php artisan make:migration create_categories_table --create=categories
So it's create migration table in database.
it's create 2016_11_24_054214_create_categories_table.php file in database/migrations folder with some basic stuff. I have added my columns information and run next command php artisan migrate so my table is created successfully.
Now I have deleted 2016_11_24_054214_create_categories_table.php file manually and delete categories table from database then I tried to create same categories table using same last command php artisan make:migration create_categories_table --create=categories but it's give me a below error.
[ErrorException]
include(/var/www/news_reporting/vendor/composer/../../database/migrations/2016_11_24_054214_create_categories_table.php): failed to open stream: No such file or directory
I googled and found one solution that run php composer dump-autoload command but this command give me below error.
Could not open input file: composer
I am using linux.
Could not open input file: composer
Please make sure that composer is installed in your system.
To check just go to terminal and write command composer if it is installed then you will see some stuff else you will get composer not found error
If above is a issue then you need to install composer in your system user this link for installing reference.
Or you might need to run php artisan migrate command for migrating migrations.
you don't need to precede composer with PHP command, try it this way:
composer dump-autoload
and that should solve your migration problem.

SQL error in Laravel when moving project between machines

I just moved my laravel project from one machine to another.
What I didn was:
-Create a new Laravel Homestead machine.
-Copy all files from my laravel app's folder
The website serves ok from my new machine but any database dependant operation fails because the tables aren't created in my new server. The error is the following:
QueryException in Connection.php line 673: SQLSTATE[42S02]: Base table or view not found:
The migrations are present in my new machine but I cant do a
php artisan migrate
or a
php artisan migrate:refresh
since both return
[Symfony\Component\Debug\Exception\FatalErrorException]
Cannot declare class CreateUsersTable, because the name is already in use
I've spent so much time here I don't know what to do.
delete all the tables from the database manually including the migrations table and run php artisan migrate

My Debian repository is throwing a "Hash Sum mismatch" error

We maintain a Debian repository for an app and all .deb files are stored on a s3 bucket.
We wrote a script to upload the files and update the Packages.gz file. All went fine until one of the developers found deb-s3 and tried using it.
After the first package upload we started getting this error message:
W: Failed to fetch s3://s3.amazonaws.com/myapp/dists/test/main/binary-amd64/Packages Hash Sum mismatch
I've tried to restore an old version of our Packages.gz file with no success. I've searched for this error and removing the /var/lib/apt/lists/ does not work either.
What would deb-s3 do that could break our entire repo?
Looks like deb-s3 creates a Releases file under dist/test and that conflicts with Packages.gz.
Removing the Release file restored our repository back to what it was.

JHipster Run Again But Failed

Yeserday I was creating jhipster and create entity (Author and Book) same as tutorial and run perfectly, but however today I run again (using gradlew bootRun) but the result is blank, the command is run without error, but the page is blank (only shows footer) . Please somebody help me to resolve my problem?
the first looking command, could not find specific ehcache for Books, Author, Author Books
after adding ehcache.xml for Book, Author, and Author.books but the result still remain blank page
Make sure that you've started grunt using grunt serve, or the equivalent command for gulp if you're using that.
Open up your web console using F12 and check for any "resource not found" errors. If you see a lot of errors, try deleting your bower_components folder then rerunning bower install.
The ehcache warnings can be safely ignored.