Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

OrmSkeleton upgrade method to be commented #84

Closed
WebEP opened this issue Sep 4, 2014 · 1 comment
Closed

OrmSkeleton upgrade method to be commented #84

WebEP opened this issue Sep 4, 2014 · 1 comment
Assignees
Milestone

Comments

@WebEP
Copy link
Collaborator

WebEP commented Sep 4, 2014

Could you add a comment to the method.upgrade.php so that people be very carefull before using this as an example?

Something like:

//Drop all the tables and recreate them
// NEVER DO LIKE THIS IN YOUR MODULES, SEE HOW TO HANDLE AN UPGRADE, USING SWITCH
$entities = MyAutoload::getAllInstances($this->GetName(), $this->getName());
foreach($entities as $anEntity) {
OrmCore::dropTable($anEntity);
OrmCore::createTable($anEntity);
}

@besstiolle
Copy link
Owner

are you serious ? o_O'

@besstiolle besstiolle added this to the 0.3.2 milestone Oct 10, 2014
@besstiolle besstiolle self-assigned this Oct 10, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants