Skip to content

Commit

Permalink
migrations: fix timestamp overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Mixaill committed Jun 28, 2018
1 parent d5dc875 commit 15dedeb
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions protected/migrations/m180628_193546_fix_timestamp.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

class m180628_193546_fix_timestamp extends CDbMigration
{
public function safeUp()
{
$this->alterColumn('{{module}}', 'timestamp','INTEGER UNSIGNED');
$this->alterColumn('{{bug_change}}', 'timestamp', 'INTEGER UNSIGNED NOT NULL');
$this->alterColumn('{{operation}}', 'timestamp', 'INTEGER UNSIGNED NOT NULL');
}

public function safeDown()
{
$this->alterColumn('{{module}}', 'timestamp', 'INTEGER');
$this->alterColumn('{{bug_change}}', 'timestamp', 'INTEGER NOT NULL');
$this->alterColumn('{{operation}}', 'timestamp', 'INTEGER NOT NULL');
}
}

0 comments on commit 15dedeb

Please sign in to comment.