-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
146 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
use Migrations\AbstractMigration; | ||
use Phinx\Db\Action\ChangeColumn; | ||
|
||
class Saitox5x3x1 extends AbstractMigration | ||
{ | ||
public function up() | ||
{ | ||
// Only apply on installations which made it to 5.3.0. See #347. | ||
if ($this->table('uploads')->hasIndex(['user_id', 'title'])) { | ||
// Remove existing index on title from 5.3.0 | ||
$this->table('uploads') | ||
->removeIndexByName('userId_title') | ||
->update(); | ||
} | ||
|
||
// Populate all NULL title fields from name | ||
$this->execute('UPDATE `uploads` SET `uploads`.`title`=COALESCE(`uploads`.`title`, `uploads`.`name`)'); | ||
|
||
// Change title to NOT NULL | ||
$this->table('uploads') | ||
->changeColumn('title', 'string', [ | ||
'default' => null, | ||
'length' => 191, | ||
'null' => false, | ||
]) | ||
->update(); | ||
|
||
// Unique index on title | ||
$this->table('uploads') | ||
->addIndex( | ||
[ | ||
'user_id', | ||
'title', | ||
], | ||
['name' => 'userId_title', 'unique' => true] | ||
) | ||
->update(); | ||
} | ||
|
||
public function down() | ||
{ | ||
$this->table('uploads') | ||
->removeIndexByName('userId_title') | ||
->update(); | ||
|
||
$this->table('uploads') | ||
->changeColumn('title', 'string', [ | ||
'default' => null, | ||
'length' => 191, | ||
'null' => true, | ||
]) | ||
->update(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
## Entwürfe | ||
|
||
Entwürfe sollen Datenverlust beim Verfassen eines neuen Beitrages vermeiden helfen. | ||
Entwürfe helfen einen Datenverlust beim Verfassen eines neuen Beitrages zu vermeiden. | ||
|
||
Der Inhalt des Beitrages wird regelmässig im Hintergrund gespeichert. Sollte es zu Problemen beim Nutzer kommen (bspw. unerwartetes Schließen des Browsers), kann der bis dahin gesicherte Inhalt später wieder hergestellt werden. Dazu muss nur ein Beitrag an der gleichen Stelle wie zuvor begonnen werden, der Inhalt eines Entwurfs wird automatisch eingefügt. | ||
Der Inhalt des Beitrages wird regelmässig im Hintergrund gespeichert. Sollte es zu einem Problem beim Nutzer kommen (bspw. unerwartetes Beenden des Browsers), kann der bis dahin gesicherte Inhalt später wieder hergestellt werden. Dazu muss ein zuvor begonnener Beitrag an der gleichen Stelle erneut geöffnet werden, der Entwurf wird dann automatisch eingefügt. | ||
|
||
Ein Ikon zeigt den aktuellen Status an: | ||
|
||
- <i class="fa fa-pencil" aria-hidden="true"></i> Änderungen ungesichert | ||
- <i class="fa fa-floppy-o" aria-hidden="true"></i> Änderungen gesichert | ||
|
||
Nach erfolgreichen Eintragen eines Beitrags wird der entsprechende Entwurf gelöscht. Entwürfe werden nach 30 Tagen als aufgegeben angesehen automatisch entfernt. | ||
Nach erfolgreichen Eintragen eines Beitrags wird der entsprechende Entwurf gelöscht. Alle Entwürfe werden spätestens nach 30 Tagen als aufgegeben angenommen und automatisch entfernt. | ||
|
||
Beim Bearbeiten eines bestehenden Beitrages wird kein Entwurf gespeichert. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.