AudioFerret/v1/sql/discarded

This was eventually going to be part of a subsystem for encouraging legit copies of "pirated" tracks. It isn't necessary in order to make the thing work, but I do plan to continue working with it for the next version. CREATE TABLE `Source_Types` ( `id` int(11) NOT NULL,  `descr` varchar(50) default NULL,  `islegalcopy` tinyint(1) default NULL,  PRIMARY KEY  (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `Source_Types` VALUES (1,'CD rip of owned CD',1), (2,'CD rip of owned content (other media)',1), (3,'Skimmed from LP',1), (4,'Skimmed from 45',1), (5,'Legal free download',1), (6,'Public Filesharing',0), (7,'Copied by 3rd party',0);

Advanced Data
These tables had not been used yet, and I think there's probably a better way to provide this functionality using a hierarchical topic/value tree.

The basic idea was to provide data on everything known about an album -- the names of everyone who worked on it, the studio where it was recorded, dates, etc. so that these could be cross-referenced and other works recorded at the same place, produced by the same person, etc. could also be looked up. CREATE TABLE `Locations` ( `id` int(11) NOT NULL,  `path` varchar(255) default NULL,  `descr` varchar(50) default NULL,  PRIMARY KEY  (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `Personnel` ( `id` int(11) NOT NULL,  `name` varchar(255) default NULL,  `sort` varchar(255) default NULL,  PRIMARY KEY  (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `Release_Data` ( `id` int(11) NOT NULL,  `id_release` int(11) default NULL,  `id_type` int(11) default NULL,  `id_person` int(11) default NULL,  `notes` varchar(255) default NULL,  PRIMARY KEY  (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `Release_Data_Types` ( `id` int(11) NOT NULL,  `descr` varchar(50) default NULL,  PRIMARY KEY  (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `Releases` ( `id` int(11) NOT NULL,  `id_artist` int(11) default NULL,  `name` varchar(255) default NULL,  `label` varchar(50) default NULL,  `catnum` varchar(50) default NULL,  `notes` varchar(255) default NULL,  PRIMARY KEY  (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `Song_Data` ( `id` int(11) NOT NULL,  `id_song` int(11) default NULL,  `id_type` varchar(50) default NULL,  `id_person` int(11) default NULL,  `notes` varchar(255) default NULL,  PRIMARY KEY  (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `Song_Data_Types` ( `id` varchar(50) NOT NULL,  `descr` varchar(50) default NULL,  PRIMARY KEY  (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `Songs` ( `id` int(11) NOT NULL,  `name` varchar(255) default NULL,  `which` varchar(50) default NULL,  `notes` varchar(255) default NULL,  PRIMARY KEY  (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `Take_Data` ( `id` int(11) NOT NULL,  `id_take` int(11) default NULL,  `id_type` varchar(50) default NULL,  `id_person` int(11) default NULL,  `value` varchar(255) default NULL,  `notes` varchar(255) default NULL,  PRIMARY KEY  (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `Take_Data_Types` ( `id` varchar(50) NOT NULL,  `descr` varchar(50) default NULL,  PRIMARY KEY  (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `Takes` ( `id` int(11) NOT NULL,  `id_song` int(11) default NULL,  `which` varchar(50) default NULL,  `descr` varchar(255) default NULL,  PRIMARY KEY  (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;