/framework/core/session/stationary/migration.tpl
http://zoop.googlecode.com/ · Smarty Template · 28 lines · 26 code · 2 blank · 0 comment · 0 complexity · f991173748e4e2f7f2fa3996f5e5734a MD5 · raw file
- <?php
- class Migration_[[$version]] extends Migration
- {
- function up()
- {
- $sql = "CREATE TABLE session_base
- (
- session_id text NOT NULL PRIMARY KEY,
- last_active timestamp with time zone NOT NULL
- )";
- SqlAlterSchema($sql);
-
- $sql = "CREATE TABLE session_data
- (
- session_id text NOT NULL,
- key text,
- value text,
- PRIMARY KEY (session_id, key)
- )";
- SqlAlterSchema($sql);
- }
-
- function down()
- {
- SqlAlterSchema("DROP TABLE session_data");
- SqlAlterSchema("DROP TABLE session_base");
- }
- }