First attempt at an import/migration procedure.

This commit is contained in:
James Cole
2014-07-03 21:31:32 +02:00
parent 35c90a32e9
commit 1836249407
13 changed files with 259 additions and 89 deletions

View File

@@ -2,11 +2,41 @@
@section('content')
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<h1>Firefly<br/>
<h1>Firefly
@if($count > 0)
<br/>
<small>What's playing?</small>
@endif
</h1>
</div>
</div>
@if($count == 0)
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<p class="lead">Welcome to Firefly III.</p>
<p>
To get get started, choose below:
</p>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
<h2><a href="{{route('migrate')}}">Migrate from Firefly II</a></h2>
<p>
Use this option if you have a JSON file from your current Firefly II installation.
</p>
</div>
<div class="col-lg-6 col-md-6 col-sm-12">
<h2><a href="#">Start from scratch</a></h2>
<p>
Use this option if you are new to Firefly (III).
</p>
</div>
@else
@endif
@stop
@section('scripts')
@stop

View File

@@ -3,50 +3,25 @@
<div class="row">
<div class="col-lg-8 col-md-8 col-sm-12">
<h1>Firefly<br/>
<small>Migration instructions</small>
<small>Migration</small>
</h1>
<ol>
<li>Open <code>app/config/database.php</code></li>
<li>Fill in the <code>old-firefly</code> connection records.</li>
<li>Refresh this page.</li>
<li>Upload <code>firefly-export-****-**-**.json</code></li>
<li>Wait..</li>
<li>Done!</li>
</ol>
<p>
It should look something like this:
</p>
<pre>
return [
'fetch' => PDO::FETCH_CLASS,
'default' => 'mysql',
'connections' => [
'mysql' => [
'driver' => 'mysql',
'host' => 'localhost',
'database' => '(current database)',
'username' => '',
'password' => '',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
],
<strong>
'old-firefly' => [
'driver' => 'mysql',
'host' => 'localhost',
'database' => '(previous database)',
'username' => '',
'password' => '',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
],</strong>
],
</pre>
<p>
This page will disappear when the connection is valid.
</p>
<p>
Current error: <code>{{$error or ''}}</code>
&nbsp;
</p>
{{Form::open(['files' => true])}}
<div class="form-group">
<label for="exportFile">Export file</label>
<input name="exportFile" type="file" id="exportFile">
<p class="help-block">Upload the export file here.</p>
</div>
<button type="submit" class="btn btn-info">Import</button>
{{Form::close()}}
</div>
</div>