From 7c6e14142001f860f79d6c93f50d88f26d1c9099 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Fri, 28 Jan 2011 18:31:56 +0100 Subject: [PATCH] Convert Horde_Token to migrations. --- .../Horde/Token/1_horde_token_base_tables.php | 19 +++++++++++++++++++ horde/scripts/sql/horde_tokens.sql | 7 ------- 2 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 framework/Token/migration/Horde/Token/1_horde_token_base_tables.php delete mode 100644 horde/scripts/sql/horde_tokens.sql diff --git a/framework/Token/migration/Horde/Token/1_horde_token_base_tables.php b/framework/Token/migration/Horde/Token/1_horde_token_base_tables.php new file mode 100644 index 000000000..c8995287b --- /dev/null +++ b/framework/Token/migration/Horde/Token/1_horde_token_base_tables.php @@ -0,0 +1,19 @@ +tables())) { + $t = $this->createTable('horde_tokens', array('primaryKey' => array('token_address', 'token_id'))); + $t->column('token_address', 'string', array('limit' => 100, 'null' => false)); + $t->column('token_id', 'string', array('limit' => 32, 'null' => false)); + $t->column('token_timestamp', 'bigint', array('null' => false)); + $t->end(); + } + } + + public function down() + { + $this->dropTable('horde_tokens'); + } +} diff --git a/horde/scripts/sql/horde_tokens.sql b/horde/scripts/sql/horde_tokens.sql deleted file mode 100644 index 8366b4fb4..000000000 --- a/horde/scripts/sql/horde_tokens.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE horde_tokens ( - token_address VARCHAR(100) NOT NULL, - token_id VARCHAR(32) NOT NULL, - token_timestamp BIGINT NOT NULL, --- - PRIMARY KEY (token_address, token_id) -); -- 2.11.0