Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.
Forum Replies Created
-
AuthorReplies
-
@rbandeira – Cheers dude!
Still, a quick link would be handy. ;)
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
So, let’s say I have 5 migrations v1_0..v1_5 and also an Installer.
During installation:
If my Installer getMigrationVersion returns v1_3 would the installerBundle(is this the one responsible for the installtions?) see that thare are also v1_4 and v1_5 and execute both of them?
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
Time when editing allowed is limited(I think about 15 minutes)
Yes now I see, but I think it is more like 5 minutes
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
Got it! Thanks!
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
Hey, I’ve got this and it is actually quite easy.
Set up your migrations and then add a new version(or integrate into an exising one):12345678910111213141516171819202122232425262728293031323334353637383940414243444546<?phpnamespace JAB\Bundle\TestBundle\Migrations\Schema\v1_1;use Doctrine\DBAL\Schema\Schema;use Oro\Bundle\MigrationBundle\Migration\QueryBag;use Oro\Bundle\MigrationBundle\Migration\Migration;use Oro\Bundle\NoteBundle\Migration\Extension\NoteExtension;use Oro\Bundle\NoteBundle\Migration\Extension\NoteExtensionAwareInterface;/*** @SuppressWarnings(PHPMD.TooManyMethods)* @SuppressWarnings(PHPMD.ExcessiveClassLength)*/class JABTestBundle implements Migration, NoteExtensionAwareInterface {/** @var NoteExtension */protected $noteExtension;/*** {@inheritdoc}*/public function setNoteExtension(NoteExtension $noteExtension) {$this->noteExtension = $noteExtension;}/*** @param Schema $schema* @param QueryBag $queries*/public function up(Schema $schema, QueryBag $queries) {self::addNoteAssociations($schema, $this->noteExtension);}/*** Enable notes for test entity** @param Schema $schema* @param NoteExtension $noteExtension*/public static function addNoteAssociations(Schema $schema, NoteExtension $noteExtension) {$noteExtension->addNoteAssociation($schema, 'jab_testEntity');}}This is a ‘v1_1’ migration class so it would go under Migrations/Schema/v1_1 folder
Check/change namespace, class name and db table name in addNoteAssociations method!
load with:
app/console oro:migration:load --force --show-queries --bundles=JABTestBundle
that’s all!
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
sorry(cannot edit previous post)[why?]
So, to be clear:
you say:“Difference between installer and migration is that installer will be applied only during installation and will fix migration’s version on version that returned by getVersion method.”
So, this means that upon bundle installation the installer and ONLY the installer is executed and so it should contain the full code (entity configuration and whatever else). At the end it registers the current migration version supplied by the installer (through getMigrationVersion) into oro_migrations table (
INSERT INTO oro_migrations (bundle, version, loaded_at) VALUES ('JABTestBundle', 'v1_0', '2014-10-24 11:25:58')
).When my bundle is updated, Oro will check at which migration version the bundle is and execute all the migrations in the bundle (supposedly v1_1) which should have only the changes with respect to what has been done in the previous migrations.
Is this correct?
If it is, then I do not understand why migration v1_0 is needed.
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
Ok, thanks.
I am looking at the AccountBundle where you have the Migrations/Schema/OroCRMAccountBundleInstaller class implementing the Installer (and supplying the “v1_5” in getMigrationVersion) and the version specific migration classes from v1_0 to v1_5 (implementing the Migration class) the in the corresponding subfolders.
What is not clear to me is why is the content of the installer is the same as the migration v1_0. If during install the installer is executed why do we need a migration class with the same content?
In my experience this often leads to human errors where we might update the installer but not the migration class or vice versa.
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
Hi @alendo, did you get anywhere with this?
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
hi,
1) today i tried to reproduce the icu error without success – all is working fine so pls ignore that.
2) now I have set my oro to use the italian language (yes i know it is not translated) – which are the files that are involved? Where are they? I have only found one .js file in the web directory. Are all translations in there (both platform and app)?
3) Crowdin is very impressive. I will v. soon start adding translations. When will the translations added in crowdin will be available inside my oro deployment for download? Do you have a weekly schedule of some sort? is it automatic? are my translations proofread?
thanks in advance
a\
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
-
AuthorReplies