A
A
alex stephen2015-03-24 14:51:27
linux
alex stephen, 2015-03-24 14:51:27

How to submit a Yii2 project to production?

In general, a subject.
I decided to try it in a new Yii2 project... I write everything in my local repository based on Yii 2 Basic Application Template .
By default, everything is in development mode (composer installs add-ons from require-dev, the YII_ENV_DEV constant is defined in php ...)
Actually, two questions: how to make the first migration and how to properly publish all this stuff on the production server (everything after git clone )?
As for the first migration, I manually designed all the tables, now we need to turn it into a Yii2 migration file.
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vit, 2015-03-24
@berezuev

Well, for example, I never make any changes to the database with my hands. Everything, starting from the creation of the first table in the database, I do only through migrations.
In your case, you can make a sql-dump, and pour it in at the first deployment before starting the migrations.

P
phpnt, 2015-05-05
@phpnt

Migrations are done like this Migrations in Yii2 . Sending to a remote server is described here .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question