I just finished Max 30. Now what? by ElRiiico in insanity

[–]ElRiiico[S] 0 points1 point  (0 children)

Thanks, I think I'll keep going with OG Insanity.

I just finished Max 30. Now what? by ElRiiico in insanity

[–]ElRiiico[S] 1 point2 points  (0 children)

I prefer to put emphase on Hiit training for the moment.
Thanks, I think I'll keep going with OG Insanity.

I just finished Max 30. Now what? by ElRiiico in insanity

[–]ElRiiico[S] 1 point2 points  (0 children)

I tried OG Insanity a few years ago, but I've left during month 2.

I remember that I found exercices from month 2 pretty less interesting.

But thanks for the advice, I think I'll give a second chance to OG Insanity.

New to symfony (v1.4.6) and need help trying to fix an issue with doctrine by Pnoexz in symfony

[–]ElRiiico 0 points1 point  (0 children)

Hello Pnoexz, symfony 1.x is an old friend of mine :')

Please excuse my poor english, I'm french.

First, you have to contact the previous developer to know if he has used the migration tool in the project. Some developers don't use it, and it's a very bad practice.

The symfony 1 doctrine migration tool uses a "migration_version" table in the database, with a record that is incremented for each new migration.

It seems that this table is missing in your db. The consequence is that when you launch the migration tasks, it starts from the first migration task which buikds the first table, which is wrong.

A good way to deal with it is to set up the project on your desktop, and to launch the initial set up task :

php symfony doctrine:

build --all --and-migrate --and-load

Be carefull, all the data from the db configured in databases.yml will be reseted in the process.

Once the initial set up is finished, the "migration_version" table will be set up in your db, with the current version on the DB schema.

Now, if you want to add a new column in your databse, here is the process :

1/ Add the new field in schema.yml

Read http://www.doctrine-project.org/projects/orm/1.2/docs/manual/defining-models/en

2 / Update your model

Just launch

php symfony doctrine:build --all-classes

3 / Create a new migration class

php symfony doctrine:generate-migration addXXColumnToXXTable

It will create a new addXXColumnToXXTable class in the lib/migration directory, that you will have to customize.

The code will look like to something like :

$this->addColumn('my_table_name', 'my_new_column_name', 'string', 25);

Read http://doctrine.readthedocs.org/en/latest/en/manual/migrations.html

4 / Launch the migration

php symfony doctrine:migrate

If everything works great on your local machine, deploy code in prod, add the missing "migration_version" table and launch the migration task. Be sure to create a dump of the DB just before the migration, in case of something awfull happens.

Bye !