Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Version 0.7 (beta 7)

* Added more migration assertions for beta 6
* Changed desc to DESCRIBE in migration assertions (easier to read)
* Updated WebTestOfUpgradeDatabase for UI change from Configuration link to Settings in beta 6
  • Loading branch information...
commit 4923da496012b5ebb70664f6273e3a7bca6fd2b3 1 parent 2588a4f
@ginatrapani ginatrapani authored
View
10 tests/WebTestOfUpgradeDatabase.php
@@ -118,7 +118,7 @@ public function testMigrations() {
}
/**
- * Sets up inital app
+ * Sets up initial app
*/
private function setUpApp($version, $MIGRATIONS) {
// run updates and migrations
@@ -195,8 +195,12 @@ private function setUpApp($version, $MIGRATIONS) {
$this->click("Log In");
$this->assertText('You have no accounts configured. Set up an account now');
- //Visit Configuration page and assert content there
- $this->click("Configuration");
+ //Visit Configuration/Settings page and assert content there
+ if (floatval($version) >= 0.6) {
+ $this->click("Settings"); //link name changed in beta 6
+ } else {
+ $this->click("Configuration");
+ }
$this->assertTitle('Configure Your Account | ThinkUp');
$this->assertText('As an administrator you can configure all installed plugins.');
View
81 tests/migration-assertions.php
@@ -29,7 +29,7 @@
*
* Database migration assertions to test during WebTestOfUpgradeDatabase
*/
-$LATEST_VERSION = 0.6;
+$LATEST_VERSION = 0.7;
$MIGRATIONS = array(
/* beta 0.1 */
@@ -38,7 +38,7 @@
'migration_assertions' => array(
'sql' => array(
array(
- 'query' => 'desc tu_owners email',
+ 'query' => 'DESCRIBE tu_owners email',
'match' => "/varchar\(200\)/",
'column' => 'Type',
)
@@ -52,12 +52,12 @@
'migration_assertions' => array(
'sql' => array(
array(
- 'query' => 'desc tu_owners email',
+ 'query' => 'DESCRIBE tu_owners email',
'match' => "/varchar\(200\)/",
'column' => 'Type',
),
array(
- 'query' => 'desc tu_posts post_id',
+ 'query' => 'DESCRIBE tu_posts post_id',
'match' => "/bigint\(11\)/",
'column' => 'Type',
)
@@ -71,37 +71,37 @@
'migration_assertions' => array(
'sql' => array(
array(
- 'query' => 'desc tu_posts in_retweet_of_post_id',
+ 'query' => 'DESCRIBE tu_posts in_retweet_of_post_id',
'match' => "/bigint\(20\) UNSIGNED/i",
'column' => 'Type',
),
array(
- 'query' => 'desc tu_posts post_id',
+ 'query' => 'DESCRIBE tu_posts post_id',
'match' => "/bigint\(20\) UNSIGNED/i",
'column' => 'Type',
),
array(
- 'query' => 'desc tu_posts in_reply_to_post_id',
+ 'query' => 'DESCRIBE tu_posts in_reply_to_post_id',
'match' => "/bigint\(20\) UNSIGNED/i",
'column' => 'Type',
),
array(
- 'query' => 'desc tu_links post_id',
+ 'query' => 'DESCRIBE tu_links post_id',
'match' => "/bigint\(20\) UNSIGNED/i",
'column' => 'Type',
),
array(
- 'query' => 'desc tu_post_errors post_id',
+ 'query' => 'DESCRIBE tu_post_errors post_id',
'match' => "/bigint\(20\) UNSIGNED/i",
'column' => 'Type',
),
array(
- 'query' => 'desc tu_users last_post_id',
+ 'query' => 'DESCRIBE tu_users last_post_id',
'match' => "/bigint\(20\) UNSIGNED/i",
'column' => 'Type',
),
array(
- 'query' => 'desc tu_instances last_post_id',
+ 'query' => 'DESCRIBE tu_instances last_post_id',
'match' => "/bigint\(20\) UNSIGNED/i",
'column' => 'Type',
),
@@ -116,7 +116,7 @@
'migration_assertions' => array(
'sql' => array(
array(
- 'query' => 'desc tu_options option_id',
+ 'query' => 'DESCRIBE tu_options option_id',
'match' => "/int\(11\)/",
'column' => 'Type',
),
@@ -155,7 +155,7 @@
/* beta 0.6 */
'0.6' => array(
- 'zip_url' => 'file://./build/thinkup.zip',
+ 'zip_url' => 'https://github.com/downloads/ginatrapani/ThinkUp/thinkup-0.6.zip',
'migrations' => 1,
'migration_assertions' => array(
'sql' => array(
@@ -165,6 +165,26 @@
'column' => 'Type',
),
array(
+ 'query' => 'DESCRIBE tu_instances last_unfav_page_checked',
+ 'match' => "/int\(11\)/",
+ 'column' => 'Type',
+ ),
+ array(
+ 'query' => 'DESCRIBE tu_instances last_page_fetched_favorites',
+ 'match' => "/int\(11\)/",
+ 'column' => 'Type',
+ ),
+ array(
+ 'query' => 'DESCRIBE tu_instances favorites_profile',
+ 'match' => "/int\(11\)/",
+ 'column' => 'Type',
+ ),
+ array(
+ 'query' => 'DESCRIBE tu_instances owner_favs_in_system',
+ 'match' => "/int\(11\)/",
+ 'column' => 'Type',
+ ),
+ array(
'query' => 'DESCRIBE tu_users favorites_count',
'match' => "/int\(11\)/",
'column' => 'Type',
@@ -177,4 +197,39 @@
)
)
),
+
+ /* beta 0.7 */
+ '0.7' => array(
+ 'zip_url' => 'file://./build/thinkup.zip',
+ 'migrations' => 1,
+ 'migration_assertions' => array(
+ 'sql' => array(
+ array(
+ 'query' => 'DESCRIBE tu_owners failed_logins',
+ 'match' => "/int\(11\)/",
+ 'column' => 'Type',
+ ),
+ array(
+ 'query' => 'DESCRIBE tu_owners account_status',
+ 'match' => "/varchar\(150\)/",
+ 'column' => 'Type',
+ ),
+ array(
+ 'query' => 'DESCRIBE tu_posts in_rt_of_user_id',
+ 'match' => "/bigint\(11\)/",
+ 'column' => 'Type',
+ ),
+ array(
+ 'query' => 'DESCRIBE tu_posts old_retweet_count_cache',
+ 'match' => "/int\(11\)/",
+ 'column' => 'Type',
+ ),
+// array(
+// 'query' => "SELECT namespace FROM tu_options WHERE namespace LIKE 'plugin_options-1' ",
+// 'match' => "/plugin_options-1/",
+// 'column' => 'namespace',
+// ),
+ )
+ )
+ ),
);
View
6 webapp/install/sql/build-db_mysql.sql
@@ -1,6 +1,6 @@
--
-- ThinkUp Database Creation Script
--- Auto-generated by thinkup/extras/scripts/migratedb script on 2010-12-20
+-- Auto-generated by thinkup/extras/scripts/migratedb script on 2010-12-27
--
ALTER DATABASE DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
@@ -301,13 +301,13 @@ CREATE TABLE tu_users (
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--- Dump completed on 2010-12-20 16:20:29
+-- Dump completed on 2010-12-27 9:05:14
--
-- Insert DB Version
--
INSERT INTO tu_options (namespace, option_name, option_value, last_updated, created)
-VALUES ('application_options', 'database_version', '0.6', NOW(), NOW());
+VALUES ('application_options', 'database_version', '0.7', NOW(), NOW());
--
-- Insert default plugin(s)
View
2  webapp/install/sql/mysql_migrations/2010-12-12_v0.6.sql.migration
@@ -1,6 +1,6 @@
ALTER TABLE `tu_instances` ADD `last_favorite_id` bigint(20) UNSIGNED default NULL;
-ALTER TABLE `tu_instances` add `last_unfav_page_checked` int(11) default 0;
+ALTER TABLE `tu_instances` ADD `last_unfav_page_checked` int(11) default 0;
ALTER TABLE `tu_instances` ADD `last_page_fetched_favorites` int(11) default NULL;
ALTER TABLE `tu_instances` ADD `favorites_profile` int(11) default 0;
ALTER TABLE `tu_instances` ADD `owner_favs_in_system` int(11) default 0;
View
3  webapp/install/sql/mysql_migrations/2010-12-20_login_lockout.sql
@@ -1,3 +0,0 @@
-ALTER TABLE `tu_owners` ADD `failed_logins` INT NOT NULL DEFAULT '0';
-
-ALTER TABLE `tu_owners` ADD `account_status` VARCHAR( 150 ) NOT NULL DEFAULT '';
View
2  webapp/install/sql/mysql_migrations/2010-12-21_plugin_config_migration.sql
@@ -1,2 +0,0 @@
-INSERT INTO tu_options (namespace, option_name, option_value, last_updated, created)
-(SELECT concat('plugin_options-', plugin_id), option_name, option_value, now(), now() FROM tu_plugin_options);
View
3  webapp/install/sql/mysql_migrations/2010-12-21_retweets.sql
@@ -1,3 +0,0 @@
-alter table tu_posts add in_rt_of_user_id bigint(11) DEFAULT NULL;
-alter table tu_posts change retweet_count_cache old_retweet_count_cache int(11) NOT NULL DEFAULT '0';
-alter table tu_posts add retweet_count_cache int(11) NOT NULL DEFAULT '0';
View
20 webapp/install/sql/mysql_migrations/2010-12-27_v0.7.sql.migration
@@ -0,0 +1,20 @@
+--
+-- 2010-12-27 Login lockout
+--
+ALTER TABLE tu_owners ADD failed_logins INT NOT NULL DEFAULT '0';
+
+ALTER TABLE tu_owners ADD account_status VARCHAR( 150 ) NOT NULL DEFAULT '';
+
+--
+-- 2010-12-21 Plugin option migration
+--
+
+INSERT INTO tu_options (namespace, option_name, option_value, last_updated, created)
+(SELECT concat('plugin_options-', plugin_id), option_name, option_value, now(), now() FROM tu_plugin_options);
+
+--
+-- 2010-12-21 Retweet handling
+--
+ALTER TABLE tu_posts ADD in_rt_of_user_id bigint(11) DEFAULT NULL;
+ALTER TABLE tu_posts CHANGE retweet_count_cache old_retweet_count_cache int(11) NOT NULL DEFAULT '0';
+ALTER TABLE tu_posts ADD retweet_count_cache int(11) NOT NULL DEFAULT '0';
View
2  webapp/install/version.php
@@ -26,6 +26,6 @@
* @license http://www.gnu.org/licenses/gpl.html
* @copyright 2009-2010 Dwi Widiastuti, Gina Trapani, Guillaume Boudreau
*/
-$THINKUP_VERSION = '0.6';
+$THINKUP_VERSION = '0.7';
$THINKUP_VERSION_REQUIRED['php'] = '5.2';
$THINKUP_VERSION_REQUIRED['mysql'] = '5';
Please sign in to comment.
Something went wrong with that request. Please try again.