Closed Lednerb closed 5 years ago
Vorgehensweise am Besten:
agb_check dazu:
insert into users ( id, email, password, is_active, agb_check, preferred_language, activation_key, passwordreset_token, token_id, created_at, updated_at)
select U.id, email, password, U.active, agb, preferred_language, activation_key, passwordreset_token, T.id, U.created_at, U.updated_at
from business_api.users U
join core_api.tokens T
on (T.token = U.token)
Letztlich verwendete Scripte:
insert into domains (id, token_id, domain, is_verified, verification_token, created_at, updated_at)
select id, token_id, domain, verified, domain_token, created_at, updated_at
from core_api.domains
where domain_token is not null
insert into tokens (id, token, credits, type, created_at, updated_at)
select id, token, credits, "regular", created_at, updated_at
from core_api.tokens
insert into users ( id, email, password, is_active, preferred_language, activation_key, passwordreset_token, token_id, created_at, updated_at)
select U.id, email, password, U.active, preferred_language, activation_key, passwordreset_token, T.id, U.created_at, U.updated_at
from business_api.users U
join core_api.tokens T
on (T.token = U.token)
php artisan tinker
- Script zum Umwandeln der URLs zu Domains (Hostnames) incl. entfernen von Duplikaten durch Registrierung via https://
und http://
:
Domains::all()->each(function ($d) {
$domain = parse_url($d->domain, PHP_URL_HOST);
try {
if($domain) $d->update(['domain' => $domain]);
} catch(\Illuminate\Database\QueryException $e) {
$d->delete();
}
});
Stand v2 Datenbank-Struktur
Ein entsprechendes Datenbank-Migrationsscript muss erstellt werden