Alexander Schäferdiek
9f085ca304
- fix some language validator inconsistencies
- added admin notifications
- added possiblity for users to delete their account
- added back index page
- works with mod_admin_rest version [afc42d7](afc42d70f0
)
35 lines
No EOL
680 B
PHP
35 lines
No EOL
680 B
PHP
<?php
|
|
use Phpmig\Migration\Migration;
|
|
|
|
class UsersRegisteredTable extends Migration
|
|
{
|
|
public $tableName = 'users_registered'; // Table name
|
|
public $db;
|
|
|
|
/**
|
|
* Do the migration
|
|
*/
|
|
public function up()
|
|
{
|
|
$this->db->create($this->tableName, function($table) {
|
|
$table->string('username')->unique()->primary();
|
|
$table->string('delete_code', 64);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Undo the migration
|
|
*/
|
|
public function down()
|
|
{
|
|
$this->db->dropIfExists($this->tableName);
|
|
}
|
|
|
|
/**
|
|
* Init the migration
|
|
*/
|
|
public function init()
|
|
{
|
|
$this->db = $this->container['schema'];
|
|
}
|
|
} |