Here is cleanetica_advanced.install file (of a "custom" module containing particulars of the site we work on):
<?php function cleanetica_advanced_schema() { $schema['video'] = array ( 'description' => 'Videos with HTML titles', 'fields' => array( 'id' => array( 'description' => 'Primary key for our table of videos', 'type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, ), 'urlinfo' => array( 'description' => 'The string referring to the video', 'type' => 'varchar', 'length' => '255', 'not null' => TRUE ), 'title' => array( 'description' => 'The title for a video, used in admin part only', 'type' => 'text', 'size' => 'medium', 'not null' => TRUE ), 'richtitle' => array( 'description' => 'The HTML-formatted title for a video', 'type' => 'text', 'size' => 'medium', 'not null' => TRUE ), ), 'primary key' => array('id'), ); return $schema; } function cleanetica_advanced_update_1(){ drupal_install_schema('cleanetica_advanced'); }
I now think that it is better to create a separate module to manage 'video' database table and related things.
The trouble is that I have already created 'video' DB table. How to move/transfer a table into an other module?