work on migration script
This commit is contained in:
parent
3b9bf2b06a
commit
9755d15f52
@ -203,7 +203,7 @@ create table llx_c_socialnetworks
|
|||||||
code varchar(100),
|
code varchar(100),
|
||||||
label varchar(150),
|
label varchar(150),
|
||||||
url text,
|
url text,
|
||||||
icon varchar(15),
|
icon varchar(20),
|
||||||
active tinyint DEFAULT 1 NOT NULL
|
active tinyint DEFAULT 1 NOT NULL
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
|||||||
@ -22,6 +22,6 @@ create table llx_c_socialnetworks
|
|||||||
code varchar(100),
|
code varchar(100),
|
||||||
label varchar(150),
|
label varchar(150),
|
||||||
url text,
|
url text,
|
||||||
icon varchar(15),
|
icon varchar(20),
|
||||||
active tinyint DEFAULT 1 NOT NULL
|
active tinyint DEFAULT 1 NOT NULL
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
@ -448,6 +448,16 @@ if (! GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'a
|
|||||||
{
|
{
|
||||||
migrate_user_photospath();
|
migrate_user_photospath();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Scripts for 11.0
|
||||||
|
$afterversionarray=explode('.', '10.0.9');
|
||||||
|
$beforeversionarray=explode('.', '11.0.9');
|
||||||
|
if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) {
|
||||||
|
migrate_users_socialnetworks();
|
||||||
|
migrate_members_socialnetworks();
|
||||||
|
migrate_contacts_socialnetworks();
|
||||||
|
migrate_thirdparties_socialnetworks();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Code executed only if migration is LAST ONE. Must always be done.
|
// Code executed only if migration is LAST ONE. Must always be done.
|
||||||
@ -4925,3 +4935,63 @@ On les corrige:
|
|||||||
update llx_facture set paye=1, fk_statut=2 where close_code is null
|
update llx_facture set paye=1, fk_statut=2 where close_code is null
|
||||||
and rowid in (...)
|
and rowid in (...)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Migrate users fields facebook and co to socialnetworks
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function migrate_users_socialnetworks()
|
||||||
|
{
|
||||||
|
global $db, $langs;
|
||||||
|
|
||||||
|
print '<tr><td colspan="4">';
|
||||||
|
|
||||||
|
print '<b>'.$langs->trans('MigrationUsersSocialNetworks')."</b><br>\n";
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Migrate members fields facebook and co to socialnetworks
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function migrate_members_socialnetworks()
|
||||||
|
{
|
||||||
|
global $db, $langs;
|
||||||
|
|
||||||
|
print '<tr><td colspan="4">';
|
||||||
|
|
||||||
|
print '<b>'.$langs->trans('MigrationMembersSocialNetworks')."</b><br>\n";
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Migrate contacts fields facebook and co to socialnetworks
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function migrate_contacts_socialnetworks()
|
||||||
|
{
|
||||||
|
global $db, $langs;
|
||||||
|
|
||||||
|
print '<tr><td colspan="4">';
|
||||||
|
|
||||||
|
print '<b>'.$langs->trans('MigrationContactsSocialNetworks')."</b><br>\n";
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Migrate thirdpartie fields facebook and co to socialnetworks
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function migrate_thirdparties_socialnetworks()
|
||||||
|
{
|
||||||
|
global $db, $langs;
|
||||||
|
|
||||||
|
print '<tr><td colspan="4">';
|
||||||
|
|
||||||
|
print '<b>'.$langs->trans('MigrationThirdpartiesSocialNetworks')."</b><br>\n";
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user