-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1446 from stakovicz/feat-1415-session-in-db
#1415 Session in DB
- Loading branch information
Showing
6 changed files
with
31 additions
and
13 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
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,20 @@ | ||
<?php | ||
|
||
use Phinx\Migration\AbstractMigration; | ||
|
||
class Sessions extends AbstractMigration | ||
{ | ||
public function change() | ||
{ | ||
$sql = <<<EOF | ||
CREATE TABLE `sessions` ( | ||
`sess_id` VARBINARY(128) NOT NULL PRIMARY KEY, | ||
`sess_data` BLOB NOT NULL, | ||
`sess_lifetime` INTEGER UNSIGNED NOT NULL, | ||
`sess_time` INTEGER UNSIGNED NOT NULL, | ||
INDEX `sessions_sess_lifetime_idx` (`sess_lifetime`) | ||
) COLLATE utf8mb4_bin, ENGINE = InnoDB; | ||
EOF; | ||
$this->execute($sql); | ||
} | ||
} |
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