Elgg  Version 3.0
20170728075418_create_users_remember_me_cookies_table.php
Go to the documentation of this file.
1 <?php
2 
5 
6 class CreateUsersRememberMeCookiesTable extends AbstractMigration {
16  public function change() {
17 
18  if ($this->hasTable("users_remember_me_cookies")) {
19  return;
20  }
21 
22  $table = $this->table("users_remember_me_cookies", [
23  'id' => false,
24  'primary_key' => ["code"],
25  'engine' => "InnoDB",
26  'encoding' => "utf8mb4",
27  'collation' => "utf8mb4_general_ci",
28  ]);
29 
30  $table->addColumn('code', 'string', [
31  'null' => false,
32  'limit' => 32,
33  ]);
34 
35  $table->addColumn('guid', 'integer', [
36  'null' => false,
37  'limit' => MysqlAdapter::INT_BIG,
38  'precision' => 20,
39  'signed' => false,
40  ]);
41 
42  $table->addColumn('timestamp', 'integer', [
43  'null' => false,
44  'limit' => MysqlAdapter::INT_REGULAR,
45  'precision' => 11,
46  'signed' => false,
47  ]);
48 
49  $table->addIndex(['timestamp'], [
50  'name' => "timestamp",
51  'unique' => false,
52  ]);
53 
54  $table->save();
55  }
56 }
change()
CREATE TABLE prefix_users_remember_me_cookies ( code varchar(32) NOT NULL, guid bigint(20) unsigned N...
$table
Definition: cron.php:57