[Solar-svn] Revision 2730

pmjones at solarphp.com pmjones at solarphp.com
Wed Aug 22 20:15:20 CDT 2007


Branch: Solar_Example_Model_*: [ADD] Added indexes.



Modified: branches/orm/Solar/Example/Model/Areas.php
===================================================================
--- branches/orm/Solar/Example/Model/Areas.php	2007-08-23 01:14:19 UTC (rev 2729)
+++ branches/orm/Solar/Example/Model/Areas.php	2007-08-23 01:15:20 UTC (rev 2730)
@@ -21,5 +21,10 @@
             'foreign_key'   => 'user_id',
         ));
         
+        $this->_indexes = array(
+            'created',
+            'updated',
+            'user_id',
+        );
     }
 }
\ No newline at end of file

Modified: branches/orm/Solar/Example/Model/Metas.php
===================================================================
--- branches/orm/Solar/Example/Model/Metas.php	2007-08-23 01:14:19 UTC (rev 2729)
+++ branches/orm/Solar/Example/Model/Metas.php	2007-08-23 01:15:20 UTC (rev 2730)
@@ -15,5 +15,9 @@
             'foreign_model' => 'nodes',
             'foreign_key'   => 'node_id',
         ));
+        
+        $this->_indexes = array(
+            'node_id',
+        );
     }
 }
\ No newline at end of file

Modified: branches/orm/Solar/Example/Model/Nodes.php
===================================================================
--- branches/orm/Solar/Example/Model/Nodes.php	2007-08-23 01:14:19 UTC (rev 2729)
+++ branches/orm/Solar/Example/Model/Nodes.php	2007-08-23 01:15:20 UTC (rev 2730)
@@ -36,5 +36,14 @@
             'through'       => 'taggings',
             'through_key'   => 'tag_id',
         ));
+        
+        $this->_indexes = array(
+            'created',
+            'updated',
+            'area_id',
+            'user_id',
+            'node_id',
+            'inherit',
+        );
     }
 }
\ No newline at end of file

Modified: branches/orm/Solar/Example/Model/Taggings.php
===================================================================
--- branches/orm/Solar/Example/Model/Taggings.php	2007-08-23 01:14:19 UTC (rev 2729)
+++ branches/orm/Solar/Example/Model/Taggings.php	2007-08-23 01:15:20 UTC (rev 2730)
@@ -18,5 +18,10 @@
         $this->_belongsTo('tag', array(
             'foreign_model' => 'tags',
         ));
+        
+        $this->_indexes = array(
+            'node_id',
+            'tag_id',
+        );
     }
 }
\ No newline at end of file

Modified: branches/orm/Solar/Example/Model/Tags.php
===================================================================
--- branches/orm/Solar/Example/Model/Tags.php	2007-08-23 01:14:19 UTC (rev 2729)
+++ branches/orm/Solar/Example/Model/Tags.php	2007-08-23 01:15:20 UTC (rev 2730)
@@ -15,5 +15,9 @@
         $this->_hasMany('nodes', array(
             'through' => 'taggings',
         ));
+        
+        $this->_indexes = array(
+            'name' => 'unique',
+        );
     }
 }
\ No newline at end of file

Modified: branches/orm/Solar/Example/Model/Users.php
===================================================================
--- branches/orm/Solar/Example/Model/Users.php	2007-08-23 01:14:19 UTC (rev 2729)
+++ branches/orm/Solar/Example/Model/Users.php	2007-08-23 01:15:20 UTC (rev 2730)
@@ -10,5 +10,11 @@
         
         $this->_table_name = Solar::run($dir . 'table_name.php');
         $this->_table_cols = Solar::run($dir . 'table_cols.php');
+        
+        $this->_indexes = array(
+            'created',
+            'updated',
+            'handle' => 'unique',
+        );
     }
 }
\ No newline at end of file




More information about the Solar-svn mailing list