← Back to team overview

mvhub-dev team mailing list archive

[Merge] lp:~jimbox-comcast/mvhub/remove_additional_seq into lp:mvhub

 

James Reynolds Jr. has proposed merging lp:~jimbox-comcast/mvhub/remove_additional_seq into lp:mvhub.

Requested reviews:
  Dan MacNeil (omacneil)
Related bugs:
  #592401 more sequences to drop synonym_id_sequence user_id_sequence   
  https://bugs.launchpad.net/bugs/592401


Adds a script to drop two vestigial sequences from the database.
-- 
https://code.launchpad.net/~jimbox-comcast/mvhub/remove_additional_seq/+merge/29730
Your team MVHub Developers is subscribed to branch lp:mvhub.
=== added file 'app-mvhub/setup/database/sql/005_synonym_cat_functions.sql'
--- app-mvhub/setup/database/sql/005_synonym_cat_functions.sql	1970-01-01 00:00:00 +0000
+++ app-mvhub/setup/database/sql/005_synonym_cat_functions.sql	2010-07-12 17:43:42 +0000
@@ -0,0 +1,24 @@
+BEGIN;
+INSERT INTO version_log (version, note ) 
+	VALUES (5,'adding two functions to return concatenated synonyms');
+
+/* Returns the concatenation of its 2 arguments, separated by a comma and a space. */
+CREATE OR REPLACE FUNCTION  our_concat(text, text) RETURNS text AS 
+$$
+    SELECT $1 || ', ' || $2;
+ $$  LANGUAGE sql
+  STABLE
+  RETURNS NULL ON NULL INPUT;
+
+
+/* Returns a concatenation of all of the values in a grouped column, 
+   delimited by a comma and a space. 
+*/
+DROP AGGREGATE IF EXISTS our_aggregate_concat(text);
+
+CREATE AGGREGATE our_aggregate_concat (
+    sfunc = our_concat,
+    basetype = text,
+    stype = text
+);
+COMMIT;

=== removed file 'app-mvhub/setup/database/sql/005_synonym_cat_functions.sql'
--- app-mvhub/setup/database/sql/005_synonym_cat_functions.sql	2010-06-18 19:40:06 +0000
+++ app-mvhub/setup/database/sql/005_synonym_cat_functions.sql	1970-01-01 00:00:00 +0000
@@ -1,24 +0,0 @@
-BEGIN;
-INSERT INTO version_log (version, note ) 
-	VALUES (5,'adding two functions to return concatenated synonyms');
-
-/* Returns the concatenation of its 2 arguments, separated by a comma and a space. */
-CREATE OR REPLACE FUNCTION  our_concat(text, text) RETURNS text AS 
-$$
-    SELECT $1 || ', ' || $2;
- $$  LANGUAGE sql
-  STABLE
-  RETURNS NULL ON NULL INPUT;
-
-
-/* Returns a concatenation of all of the values in a grouped column, 
-   delimited by a comma and a space. 
-*/
-DROP AGGREGATE IF EXISTS our_aggregate_concat(text);
-
-CREATE AGGREGATE our_aggregate_concat (
-    sfunc = our_concat,
-    basetype = text,
-    stype = text
-);
-COMMIT;

=== added file 'app-mvhub/setup/database/sql/010_remove_more_unused_seq.sql'
--- app-mvhub/setup/database/sql/010_remove_more_unused_seq.sql	1970-01-01 00:00:00 +0000
+++ app-mvhub/setup/database/sql/010_remove_more_unused_seq.sql	2010-07-12 17:43:42 +0000
@@ -0,0 +1,8 @@
+BEGIN;
+
+INSERT INTO version_log ( version,note ) 
+	VALUES (10,'Removes one unused seq');
+
+DROP SEQUENCE user_id_sequence;
+     	         
+COMMIT;

=== modified file 'lib-mvhub/lib/MVHub/Synonyms.pm'
--- lib-mvhub/lib/MVHub/Synonyms.pm	2010-06-29 19:21:04 +0000
+++ lib-mvhub/lib/MVHub/Synonyms.pm	2010-07-12 17:43:42 +0000
@@ -37,6 +37,7 @@
 # one word synonyms of each other.
 sub fetch_synonyms_from_db {
     my $dbh = MVHub::Utils::DB::get_dbh();
+
     my $sql = MVHub::Utils::DB::get_sql_select_statement(
         'SYNONYM_STEM_X_SUBMITTED_WORDS');
 


Follow ups