Doctrine see old Entities after migrating - doctrine-orm

I have a domain www.mydomain.com where is installed a web app perfectly working.
I had to create a third level domain test.mydomain.com where I copied all the file of my web app included all the doctrine files.
I don't think I need to explain what test will be used to...anyway, after migrating my entire project and applied some modifications to the entities when I launch the command:
php doctrine orm:schema-tool:create --dump-sql
In the generated queries, the old entities from the production project are shown instead of the modified ones.
I deleted all the cache with the following commands:
php doctrine orm:clear-cache:query --flush
php doctrine orm:clear-cache:metadata --flush
php doctrine orm:clear-cache:result --flush
php doctrine orm:clear-cache:query
php doctrine orm:clear-cache:metadata
php doctrine orm:clear-cache:result
It didn't work. The connection with the DB is good and also the credentials work fine I've already tested this. It doesn't work the update and create schema commands.
Any advises?

In the file cli-config.php there were a constant which pointed in the production server folder. Once updated the path everything worked fine.

Related

Automate DB Schema Migrations - CircleCI/Sequelize/GCP

I currently am working on an Application with a MySQL back-end hosted on GCP. Code is Node.js and we use CircleCI and Sequelize. Right now after deploying my scripts, if I had any schema changes, I would go in to the database and manually add those fields with sql scripts. We create migrations in our code and want to add those new field programmatically. I need to go in the container root and manually run the npx sequelize db:migrate. Is there a way to automate that?
For background info, I come from the database side not developer side, so please be gentle if my question seems to have an obvious answer.

Rails4 application with just mongoid and no database

I am trying to develop a mongo only api application with rails. After removing the sqlite gem and database configuration I am getting following error:
Cannot load Rails.application.database_configuration: Could not load database configuration. No such file - ["config/database.yml"]
When I put an empty file there, it gives me an error about not finding development database adapter.
I am using mongo and I will never be using a rdbms, how can I get rid of these errors, one solution is to keep dummy database, but it would create trouble when deploying to heroku.
How can I setup mongoid correctly, so that the application does not asks me for a traditional database configuration?
Find a good answer here. Basically you have to comment out all the references to "active_record" in the config folder.

How to use doctrine migration without console

how can I use Doctrine Migrations on the shared web hosting where is no access to SSH? I tried looking everywhere for same solution but I didn't find anything.
Thanks

ZF2 console awareness with doctrine2

I'm trying to set up some console capabilities in Zend Framework 2 and I get the gist of the setup, but I also have Doctrine2 included in my composer requirements, and the doctrine cli keeps interceding when I'm trying to get console routing set up in ZF2. Is there any way to keep the doctrine functionality but still get the index.php to accept pre-configured routing commands from the command line interface?
OK, I figured out what the problem was. I was calling out to the console from phpstorm so I figured it would need quotes around the parameters. For some reason, phpstorm was sending them with the quotes still attached. (probably re-quoting them for me?) so instead of seeing commands like:
php.exe public/index.php migration materials
it was getting:
php.exe public/index.php 'migration' 'materials'
Which did not match the configured routing. I so hate it when programs try to think for me.

Set up an existing Django app on another server

This must, must, must be a duplicate but I can't find the answer either here or on Google.
I have an existing Django app and I want to deploy it on another server.
What are the steps I need to go through to get it running elsewhere, in words of one syllable?
At a minimum, presumably:
create a project on the new server
copy over all my app's files into that project
edit localsettings.py or equivalent with local database settings etc
run python manage.py syncdb to create my database
load fixtures
run tests
Is that it? Are there any unofficial or official instructions for copying an app elsewhere?
Thanks.
The most basic, easy way to do it is:
Set up the server environment so that it matches the current environment as closely as possible. The most important thing is that you're using the same version of Django (obviously). You can run a different database, but it makes porting from the old server to the new server a little more involved. Otherwise, you will just have to adjust your settings to match the new server, if they can't be duplicated (ie, user names, etc).
Copy over your code
Dump your old database structure and data into the new database
Running startproject isn't strictly necessary. Your web server just needs to be configured correctly, to run django with the appropriate settings.py file -- and Django takes it from there.