W3TPL/dev: Difference between revisions

From Woozle Writes Code
Jump to navigation Jump to search
(class stuff probably obsolete)
 
m (updated tags)
Line 4: Line 4:
These tables were originally intended to be added to the wiki's database, but with the possibility that they might go in a separate db to allow sharing between multiple wikis.
These tables were originally intended to be added to the wiki's database, but with the possibility that they might go in a separate db to allow sharing between multiple wikis.


<mysql>CREATE TABLE `w3_class` (
<syntaxhighlight lang=mysql>CREATE TABLE `w3_class` (
   `ID` INT  NOT NULL AUTO_INCREMENT,
   `ID` INT  NOT NULL AUTO_INCREMENT,
   `Name`    VARCHAR(63) COMMENT 'name of class',
   `Name`    VARCHAR(63) COMMENT 'name of class',
   PRIMARY KEY(`ID`)
   PRIMARY KEY(`ID`)
  )
  )
  ENGINE = MYISAM;</mysql>
  ENGINE = MYISAM;</syntaxhighlight>
<mysql>CREATE TABLE `w3_method` (
<syntaxhighlight lang=mysql>CREATE TABLE `w3_method` (
   `ID_class` INT          NOT NULL AUTO_INCREMENT COMMENT "ID of w3_class to which this field belongs",
   `ID_class` INT          NOT NULL AUTO_INCREMENT COMMENT "ID of w3_class to which this field belongs",
   `Name`    VARCHAR(63)  NOT NULL                COMMENT "name of method",
   `Name`    VARCHAR(63)  NOT NULL                COMMENT "name of method",
Line 16: Line 16:
   PRIMARY KEY(`ID`)
   PRIMARY KEY(`ID`)
  )
  )
  ENGINE = MYISAM;</mysql>
  ENGINE = MYISAM;</syntaxhighlight>
<mysql>CREATE TABLE `w3_object` (
<syntaxhighlight lang=mysql>CREATE TABLE `w3_object` (
   `ID`      INT NOT NULL AUTO_INCREMENT,
   `ID`      INT NOT NULL AUTO_INCREMENT,
   `ID_class` INT NOT NULL COMMENT "ID of w3_class for this object"
   `ID_class` INT NOT NULL COMMENT "ID of w3_class for this object"
Line 23: Line 23:
   PRIMARY KEY(`ID`)
   PRIMARY KEY(`ID`)
  )
  )
  ENGINE = MYISAM;</mysql>
  ENGINE = MYISAM;</syntaxhighlight>
<mysql>CREATE TABLE `w3_field` (
<syntaxhighlight lang=mysql>CREATE TABLE `w3_field` (
   `ID_object` INT        NOT NULL AUTO_INCREMENT COMMENT "ID of w3_object to which this field belongs",
   `ID_object` INT        NOT NULL AUTO_INCREMENT COMMENT "ID of w3_object to which this field belongs",
   `Name`    VARCHAR(63)  NOT NULL                COMMENT "name of field",
   `Name`    VARCHAR(63)  NOT NULL                COMMENT "name of field",
Line 30: Line 30:
   PRIMARY KEY(`ID`)
   PRIMARY KEY(`ID`)
  )
  )
  ENGINE = MYISAM;</mysql>
  ENGINE = MYISAM;</syntaxhighlight>

Revision as of 18:47, 15 April 2022

Class Data

After discovering the existence of page_props I began to think that these tables might actually be unnecessary, but I'm keeping these table specs here in case I change my mind later. I think some PHP code was written to use these tables, but it never got to the point of being usable; it should probably be stripped out (maybe archive it here).

These tables were originally intended to be added to the wiki's database, but with the possibility that they might go in a separate db to allow sharing between multiple wikis.

CREATE TABLE `w3_class` (
   `ID` INT  NOT NULL AUTO_INCREMENT,
   `Name`     VARCHAR(63) COMMENT 'name of class',
   PRIMARY KEY(`ID`)
 )
 ENGINE = MYISAM;
CREATE TABLE `w3_method` (
   `ID_class` INT          NOT NULL AUTO_INCREMENT COMMENT "ID of w3_class to which this field belongs",
   `Name`     VARCHAR(63)  NOT NULL                COMMENT "name of method",
   `Code`     VARCHAR(255) NOT NULL                COMMENT "method's code",
   PRIMARY KEY(`ID`)
 )
 ENGINE = MYISAM;
CREATE TABLE `w3_object` (
   `ID`       INT NOT NULL AUTO_INCREMENT,
   `ID_class` INT NOT NULL COMMENT "ID of w3_class for this object"
   `Name`     VARCHAR(63)  COMMENT 'name of object',
   PRIMARY KEY(`ID`)
 )
 ENGINE = MYISAM;
CREATE TABLE `w3_field` (
   `ID_object` INT         NOT NULL AUTO_INCREMENT COMMENT "ID of w3_object to which this field belongs",
   `Name`     VARCHAR(63)  NOT NULL                COMMENT "name of field",
   `Value`    VARCHAR(255) NOT NULL                COMMENT "value of field",
   PRIMARY KEY(`ID`)
 )
 ENGINE = MYISAM;