cachethq/core

Migrate v2.4 installations to v3.x

Offen

#184 geöffnet am 15.01.2025

 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)PHP (82 Forks)github user discovery
help wanted

Repository-Metriken

Stars
 (227 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 10T 23h) (28 gemergte PRs in 30 T)

Beschreibung

We need a method of migrating users from 2.4 to 3.x.

Things to consider:

  • Migrate settings
  • Migrate resources
  • Migrate subscriptions / subscribers
  • Migrate API Keys

AOB (please add to this list)


As a comment on the latter, once #183 is merged, we'll need to programmatically migrate users 2.4 API Keys to 3.x using something like the following

$v2ApiKey = $v2User->api_key;

$v3User->tokens()->create([
    'name' => 'v2.4 API Key',
    'token' => hash('sha256', $v2ApiKey),
    'abilities' => ['*'],
    'expires_at' => now()->addDays(90),
]);

@jbrooksuk We need to decide on the abilities and expires_at. IMO it makes sense to throw something into the upgrade documentation that old 2.4 API Keys will continue to work for up to 90 days. But if they want to use the API after that, then they'll need to generate a new API Token using the 3.x dashboard.

Contributor Guide