silverstripe-module migraterelations
Migrates specific relations defined in yml.
dnadesign/migraterelations
Migrates specific relations defined in yml.
- Wednesday, August 23, 2017
- by pitchandtone
- Repository
- 13 Watchers
- 0 Stars
- 107 Installations
- PHP
- 1 Dependents
- 0 Suggesters
- 2 Forks
- 0 Open issues
- 5 Versions
- 23 % Grown
silverstripe-migraterelations
Migrates specific silverstripe relations defined in yml, (*1)
How to use
1 - Update your classes to use the new relations.
2 - Define the fields you want to migrate in a yml file. eg:, (*2)
---
Name: migration
---
Migrate:
remove_table:
0:
table_name: AnEmptyObsoleteTable
db_field:
0:
owner_current: 'CurrentOwnerClassName'
owner_new: 'NewOwnerClassName'
field_name_current: CurrentDBFieldName
field_name_new: NewDBFieldName
field_type: VARCHAR(255)
has_one:
0:
owner_current: 'CurrentHasOneClassName'
owner_new: 'NewHasOneClassName'
field_name_current: CurrentDBFieldName
field_name_new: NewDBFieldName
1:
owner_current: 'OtherCurrentHasOneClassName'
owner_new: 'OtherNewHasOneClassName'
field_name_current: OtherCurrentDBFieldName
field_name_new: OtherNewDBFieldName
many_many:
0:
owner_current: 'CurrentManyManyOwnerClassName'
owner_new: 'NewManyManyOwnerClassName'
field_name: 'RelationName'
3 - Run dev/tasks/MigrateRelationsTask, (*3)
dev-master
9999999-dev
Migrates specific relations defined in yml.
Sources
Download
The Requires
migrations
silverstripe
migrate
3.0.x-dev
3.0.9999999.9999999-dev
Migrates specific relations defined in yml.
Sources
Download
The Requires
migrations
silverstripe
migrate
1.0.1
1.0.1.0
Migrates specific relations defined in yml.
Sources
Download
The Requires
migrations
silverstripe
migrate
dev-feature/silverstripe4
dev-feature/silverstripe4
Migrates specific relations defined in yml.
Sources
Download
The Requires
migrations
silverstripe
migrate
1.0
1.0.0.0
Migrates specific relations defined in yml.
Sources
Download
The Requires
migrations
silverstripe
migrate