1: <?php
2:
3: class Create_Session_Table {
4:
5: /**
6: * Make changes to the database.
7: *
8: * @return void
9: */
10: public function up()
11: {
12: Schema::table(Config::get('session.table'), function($table)
13: {
14: $table->create();
15:
16: // The session table consists simply of an ID, a UNIX timestamp to
17: // indicate the expiration time, and a blob field which will hold
18: // the serialized form of the session payload.
19: $table->string('id')->length(40)->primary('session_primary');
20:
21: $table->integer('last_activity');
22:
23: $table->text('data');
24: });
25: }
26:
27: /**
28: * Revert the changes to the database.
29: *
30: * @return void
31: */
32: public function down()
33: {
34: Schema::table(Config::get('session.table'), function($table)
35: {
36: $table->drop();
37: });
38: }
39:
40: }