Difference between revisions of "AudioFerret/v2/topics"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
m (Woozle moved page AudioFerret/v2/topic to AudioFerret/v2/topics without leaving a redirect: using plural where it sounds right)
(saving work)
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
 
** '''2012-12-24''' adapted from [[VbzCart/tables/cat topic]]
 
** '''2012-12-24''' adapted from [[VbzCart/tables/cat topic]]
 
==SQL==
 
==SQL==
<mysql>CREATE TABLE `topic` (
+
<mysql>CREATE TABLE `topics` (
 
   `ID`        INT              NOT NULL AUTO_INCREMENT,
 
   `ID`        INT              NOT NULL AUTO_INCREMENT,
 
   `ID_Parent` INT          DEFAULT NULL COMMENT "topic.ID of parent topic",
 
   `ID_Parent` INT          DEFAULT NULL COMMENT "topic.ID of parent topic",
Line 17: Line 17:
 
   PRIMARY KEY(`ID`)
 
   PRIMARY KEY(`ID`)
 
) ENGINE = MYISAM;</mysql>
 
) ENGINE = MYISAM;</mysql>
 +
===Migration===
 +
Table with temporary fields for migration:
 +
<mysql>CREATE TABLE `topics` (
 +
  `ID`        INT              NOT NULL AUTO_INCREMENT,
 +
  `ID_Parent` INT          DEFAULT NULL COMMENT "topic.ID of parent topic",
 +
  `ID_Album`  INT          DEFAULT NULL COMMENT "temp field for migration",
 +
  `ID_Artist` INT          DEFAULT NULL COMMENT "temp field for micration",
 +
  `Name`      VARCHAR(128)    NOT NULL COMMENT "generic name (context-free, but as short as possible)",
 +
  `NameTree`  VARCHAR(64)  DEFAULT NULL COMMENT "name within context of parent; defaults to Name",
 +
  `NameFull`  VARCHAR(255) DEFAULT NULL COMMENT "descriptive standalone name (context free, can be long)",
 +
  `NameMeta`  VARCHAR(144) DEFAULT NULL COMMENT "plain text for HTML META description tag",
 +
  `Usage`    VARCHAR(255) DEFAULT NULL COMMENT "usage instructions for this topic - show when editing topic",
 +
  `Sort`      VARCHAR(15)  DEFAULT NULL COMMENT "optional sorting key",
 +
  `Variants`  VARCHAR(255) DEFAULT NULL COMMENT "synonyms and other keywords which should find this topic",
 +
  `Mispeled`  VARCHAR(255) DEFAULT NULL COMMENT "same as Variants, but these are WRONG spellings; avoid displaying",
 +
  PRIMARY KEY(`ID`)
 +
) ENGINE = MYISAM;</mysql>
 +
Migrating (old) artists to (new) topics -- first create master topics for "artists" and "albums"... [still working this out]
 +
<mysql>INSERT INTO aferret.topics(ID_Parent,ID_Artist,
 +
</mysql>

Latest revision as of 11:05, 11 September 2013

About

  • Notes: My thinking is that any additional details can go on a wiki page whose name will be built from NameTree.
  • History:

SQL

<mysql>CREATE TABLE `topics` (

 `ID`        INT              NOT NULL AUTO_INCREMENT,
 `ID_Parent` INT          DEFAULT NULL COMMENT "topic.ID of parent topic",
 `Name`      VARCHAR(128)     NOT NULL COMMENT "generic name (context-free, but as short as possible)",
 `NameTree`  VARCHAR(64)  DEFAULT NULL COMMENT "name within context of parent; defaults to Name",
 `NameFull`  VARCHAR(255) DEFAULT NULL COMMENT "descriptive standalone name (context free, can be long)",
 `NameMeta`  VARCHAR(144) DEFAULT NULL COMMENT "plain text for HTML META description tag",
 `Usage`     VARCHAR(255) DEFAULT NULL COMMENT "usage instructions for this topic - show when editing topic",
 `Sort`      VARCHAR(15)  DEFAULT NULL COMMENT "optional sorting key",
 `Variants`  VARCHAR(255) DEFAULT NULL COMMENT "synonyms and other keywords which should find this topic",
 `Mispeled`  VARCHAR(255) DEFAULT NULL COMMENT "same as Variants, but these are WRONG spellings; avoid displaying",
 PRIMARY KEY(`ID`)

) ENGINE = MYISAM;</mysql>

Migration

Table with temporary fields for migration: <mysql>CREATE TABLE `topics` (

 `ID`        INT              NOT NULL AUTO_INCREMENT,
 `ID_Parent` INT          DEFAULT NULL COMMENT "topic.ID of parent topic",
 `ID_Album`  INT          DEFAULT NULL COMMENT "temp field for migration",
 `ID_Artist` INT          DEFAULT NULL COMMENT "temp field for micration",
 `Name`      VARCHAR(128)     NOT NULL COMMENT "generic name (context-free, but as short as possible)",
 `NameTree`  VARCHAR(64)  DEFAULT NULL COMMENT "name within context of parent; defaults to Name",
 `NameFull`  VARCHAR(255) DEFAULT NULL COMMENT "descriptive standalone name (context free, can be long)",
 `NameMeta`  VARCHAR(144) DEFAULT NULL COMMENT "plain text for HTML META description tag",
 `Usage`     VARCHAR(255) DEFAULT NULL COMMENT "usage instructions for this topic - show when editing topic",
 `Sort`      VARCHAR(15)  DEFAULT NULL COMMENT "optional sorting key",
 `Variants`  VARCHAR(255) DEFAULT NULL COMMENT "synonyms and other keywords which should find this topic",
 `Mispeled`  VARCHAR(255) DEFAULT NULL COMMENT "same as Variants, but these are WRONG spellings; avoid displaying",
 PRIMARY KEY(`ID`)

) ENGINE = MYISAM;</mysql> Migrating (old) artists to (new) topics -- first create master topics for "artists" and "albums"... [still working this out] <mysql>INSERT INTO aferret.topics(ID_Parent,ID_Artist, </mysql>