? tw-schema-documentation.patch
Index: tw.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/tw/tw.install,v
retrieving revision 1.1.2.11
diff -u -p -r1.1.2.11 tw.install
--- tw.install	17 Oct 2009 23:28:47 -0000	1.1.2.11
+++ tw.install	20 Oct 2009 23:12:25 -0000
@@ -10,24 +10,27 @@
  */
 function tw_schema() {
   $schema['tw_tables'] = array(
-    'description' => t('Tables tracked by the Table Wizard module'),
+    'description' => 'Tables tracked by the Table Wizard module.',
     'fields' => array(
       'twtid' => array(
         'type' => 'serial',
         'unsigned' => TRUE,
         'not null' => TRUE,
+        'description' => 'Unique ID for table.',
       ),
       'tablename' => array(
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
         'default' => '',
+        'description' => 'Name of table.',
       ),
       'dbconnection' => array(
         'type' => 'varchar',
         'length' => 255,
         'non null' => TRUE,
         'default' => 'default',
+        'description' => "Which \$db_url connection from settings.php is used to connect to the table (defaults to 'default', Drupal's own database connection).",
       ),
       'provide_view' => array(
         'type' => 'int',
@@ -35,46 +38,53 @@ function tw_schema() {
         'unsigned' => TRUE,
         'not null' => TRUE,
         'default' => (int)TRUE,
+        'description' => 'A boolean flag indicating whether to provide a default view for Views module.',
       ),
       'view_name' => array(
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
         'default' => '',
+        'description' => 'Name of the default view provided by this table.',
       ),
     ),
     'primary key' => array('twtid'),
   );
 
   $schema['tw_columns'] = array(
-    'description' => t('Information on fields (columns) in tables managed by Table Wizard'),
+    'description' => 'Information on fields (columns) in tables managed by Table Wizard.',
     'fields' => array(
       'twcid' => array(
         'type' => 'serial',
         'unsigned' => TRUE,
         'not null' => TRUE,
+        'description' => 'Unique ID for column.',
       ),
       'twtid' => array(
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
+        'description' => "The column's associated table. Links to {tw_table}.twtid.",
       ),
       'colname' => array(
         'type' => 'varchar',
         'length' => 255,
         'not null' => TRUE,
         'default' => '',
+        'description' => 'Name of the column.',
       ),
       'weight' => array(
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
+        'description' => 'Weight of column. Used for positioning fields within the view.',
       ),
       'primarykey' => array(
         'type' => 'int',
         'size' => 'tiny',
         'not null' => TRUE,
         'default' => (int)FALSE,
+        'description' => "A flag to indicate whether this column is the table's primary key.",
       ),
       'availablefk' => array(
         'type' => 'int',
@@ -82,12 +92,14 @@ function tw_schema() {
         'not null' => TRUE,
         'unsigned' => TRUE,
         'default' => (int)FALSE,
+        'description' => 'A flag to indicate whether this column is available as a foreign key for creating relationships.'
       ),
       'secure' => array(
         'type' => 'int',
         'size' => 'tiny',
         'not null' => TRUE,
         'default' => (int)FALSE,
+        'description' => 'TODO: No idea.',
       ),
       'ignorecol' => array(
         'type' => 'int',
@@ -95,6 +107,7 @@ function tw_schema() {
         'unsigned' => TRUE,
         'not null' => TRUE,
         'default' => (int)FALSE,
+        'description' => 'A flag to indicate whether the column should be ignored, or hidden, in default views.'
       ),
       'isempty' => array(
         'type' => 'int',
@@ -102,35 +115,44 @@ function tw_schema() {
         'unsigned' => TRUE,
         'not null' => TRUE,
         'default' => (int)FALSE,
+        'description' => 'A flag to indicate whether the column contains all empty values in the table data after analysis.',
       ),
       'coltype' => array(
         'type' => 'varchar',
         'length' => 255,
+        'description' => "A string indicating the column's data type. For example, 'varchar', 'int', etc. Maps to hook_schema()'s definitions.",
       ),
       'minlength' => array(
         'type' => 'int',
+        'description' => 'For varchar and text columns, the shortest number of characters found in the table data after analysis.',
       ),
       'maxlength' => array(
         'type' => 'int',
+        'description' => 'For varchar and text columns, the longest number of characters found in the table data after analysis.',
       ),
       'minvalue' => array(
         'type' => 'float',
+        'description' => 'For numeric columns, the smallest value found in the table data after analysis.',
       ),
       'maxvalue' => array(
         'type' => 'float',
+        'description' => 'For numeric columns, the largest value found in the table data after analysis.',
       ),
       'minstring' => array(
         'type' => 'varchar',
         'length' => 255,
+        'description' => 'For varchar and text columns, the shortest string found in the table data after analysis.',
       ),
       'maxstring' => array(
         'type' => 'varchar',
         'length' => 255,
+        'description' => 'For varchar and text columns, the longest string found in the table data after analysis.',
       ),
       'comments' => array(
         'type' => 'text',
         'size' => 'medium',
         'not null' => FALSE,
+        'description' => 'User-entered comments on each column to leave notes about things such as its suitability for data import and any transformation that needs to occur.',
       ),
     ),
     'primary key' => array('twcid'),
@@ -140,22 +162,25 @@ function tw_schema() {
   );
 
   $schema['tw_relationships'] = array(
-    'description' => t('Information on relationships between tables'),
+    'description' => 'Information on relationships between tables.',
     'fields' => array(
       'twrid' => array(
         'type' => 'serial',
         'unsigned' => TRUE,
         'not null' => TRUE,
+        'description' => 'Unique ID for relationship.',
       ),
       'leftcol' => array(
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
+        'description' => 'The {tw_columns}.twcid for the left side of the join.',
       ),
       'rightcol' => array(
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
+        'description' => 'The {tw_columns}.twcid for the right side of the join.',
       ),
       'automatic' => array(
         'type' => 'int',
@@ -163,6 +188,7 @@ function tw_schema() {
         'unsigned' => TRUE,
         'not null' => TRUE,
         'default' => (int)FALSE,
+        'description' => 'A flag indicating whether relationship should be inferred as a join (1 = Automatic) or a relationship (0 = Manual) that is specified explicity.',
       ),
     ),
     'primary key' => array('twrid'),
