myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2550] trunk: removed (unused) inter-network rela


From: noreply
Subject: [myexperiment-hackers] [2550] trunk: removed (unused) inter-network relationships
Date: Thu, 13 Jan 2011 07:54:59 -0500 (EST)

Revision
2550
Author
dgc
Date
2011-01-13 07:54:58 -0500 (Thu, 13 Jan 2011)

Log Message

removed (unused) inter-network relationships

Modified Paths

Added Paths

Removed Paths

Diff

Added: trunk/db/migrate/089_remove_network_relationships.rb (0 => 2550)


--- trunk/db/migrate/089_remove_network_relationships.rb	                        (rev 0)
+++ trunk/db/migrate/089_remove_network_relationships.rb	2011-01-13 12:54:58 UTC (rev 2550)
@@ -0,0 +1,16 @@
+class RemoveNetworkRelationships < ActiveRecord::Migration
+  def self.up
+    drop_table :relationships
+  end
+
+  def self.down
+    create_table "relationships", :force => true do |t|
+      t.column "network_id",  :integer
+      t.column "relation_id", :integer
+      t.column "created_at",  :datetime
+      t.column "accepted_at", :datetime
+    end
+  end
+end
+
+

Modified: trunk/lib/account_management.rb (2549 => 2550)


--- trunk/lib/account_management.rb	2010-12-14 15:03:57 UTC (rev 2549)
+++ trunk/lib/account_management.rb	2011-01-13 12:54:58 UTC (rev 2550)
@@ -48,7 +48,6 @@
     :policies                   => { :owner => :contributor },
     :profiles                   => { :owner => :user_id, :skip_on_merge => true },
     :ratings                    => { :owner => :user_id },
-    :relationships              => { :ignore => :true },
     :remote_workflows           => { :owner => :unknown },
     :reviews                    => { :owner => :user_id },
     :schema_info                => { :ignore => :true },

Modified: trunk/lib/maintenance/GeneratePublicData.php (2549 => 2550)


--- trunk/lib/maintenance/GeneratePublicData.php	2010-12-14 15:03:57 UTC (rev 2549)
+++ trunk/lib/maintenance/GeneratePublicData.php	2011-01-13 12:54:58 UTC (rev 2550)
@@ -337,14 +337,6 @@
   PRIMARY KEY  (id),
   KEY fk_ratings_user (user_id)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;";
-	$createtable['relationships']="CREATE TABLE relationships (
-  id int(11) NOT NULL auto_increment,
-  network_id int(11) default NULL,
-  relation_id int(11) default NULL,
-  created_at datetime default NULL,
-  accepted_at datetime default NULL,
-  PRIMARY KEY  (id)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;";
 	$createtable['remote_workflows']="CREATE TABLE remote_workflows (
   id int(11) NOT NULL auto_increment,
   workflow_id int(11) default NULL,
@@ -496,7 +488,6 @@
 	$publicsql['policies']="select * from policies where view_public=1";
 	$publicsql['profiles']="select * from profiles";
         $publicsql['ratings']="select ratings.* from ratings inner join contributions on ratings.rateable_id=contributions.contributable_id and ratings.rateable_type=contributions.contributable_type inner join policies on contributions.policy_id=policies.id where policies.view_public=1";
-        $publicsql['relationships']="select * from relationships";
 	$publicsql['remote_workflows']="select remote_workflows.* from remote_workflows inner join contributions on remote_workflows.workflow_id=contributions.contributable_id and contributions.contributable_type='Workflow' inner join policies on contributions.policy_id=policies.id where policies.view_public=1 and 1=0";
 
         $publicsql['reviews']="select reviews.* from reviews inner join contributions on reviews.reviewable_id=contributions.contributable_id and reviews.reviewable_type=contributions.contributable_type inner join policies on contributions.policy_id=policies.id where policies.view_public=1";

Modified: trunk/lib/maintenance/backup.rb (2549 => 2550)


--- trunk/lib/maintenance/backup.rb	2010-12-14 15:03:57 UTC (rev 2549)
+++ trunk/lib/maintenance/backup.rb	2011-01-13 12:54:58 UTC (rev 2550)
@@ -155,7 +155,6 @@
       table(:model => Policy,                 :filter  => true)
       table(:model => Profile)
       table(:model => Rating,                 :filter  => true, :auth_object => "rateable")
-      table(:name  => "relationships",        :no_data => true)
       table(:model => RemoteWorkflow,         :no_data => true)
       table(:model => Review,                 :filter  => true, :auth_object => "reviewable")
       table(:name  => "schema_info")

Deleted: trunk/test/fixtures/relationships.yml (2549 => 2550)


--- trunk/test/fixtures/relationships.yml	2010-12-14 15:03:57 UTC (rev 2549)
+++ trunk/test/fixtures/relationships.yml	2011-01-13 12:54:58 UTC (rev 2550)
@@ -1,13 +0,0 @@
-# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
-one:
-  id: 1
-  network_id: 1
-  relation_id: 1
-  created_at: 2007-07-30 14:09:26
-  accepted_at: 2007-07-30 14:09:26
-two:
-  id: 2
-  network_id: 1
-  relation_id: 1
-  created_at: 2007-07-30 14:09:26
-  accepted_at: 2007-07-30 14:09:26

Deleted: trunk/test/unit/relationship_test.rb (2549 => 2550)


--- trunk/test/unit/relationship_test.rb	2010-12-14 15:03:57 UTC (rev 2549)
+++ trunk/test/unit/relationship_test.rb	2011-01-13 12:54:58 UTC (rev 2550)
@@ -1,10 +0,0 @@
-require File.dirname(__FILE__) + '/../test_helper'
-
-class RelationshipTest < Test::Unit::TestCase
-  fixtures :relationships
-
-  # Replace this with your real tests.
-  def test_truth
-    assert true
-  end
-end

reply via email to

[Prev in Thread] Current Thread [Next in Thread]