[25126] users/jberry/mpwa/doc/schema.sql

source_changes at macosforge.org source_changes at macosforge.org
Mon May 14 08:12:41 PDT 2007


Revision: 25126
          http://trac.macosforge.org/projects/macports/changeset/25126
Author:   jberry at macports.org
Date:     2007-05-14 08:12:40 -0700 (Mon, 14 May 2007)

Log Message:
-----------
mpwa: Table naming must exactly match case expected by rails for use on case-sensitive file systems

Modified Paths:
--------------
    users/jberry/mpwa/doc/schema.sql

Modified: users/jberry/mpwa/doc/schema.sql
===================================================================
--- users/jberry/mpwa/doc/schema.sql	2007-05-14 14:32:08 UTC (rev 25125)
+++ users/jberry/mpwa/doc/schema.sql	2007-05-14 15:12:40 UTC (rev 25126)
@@ -1,7 +1,7 @@
 -- People represents a person, potentially with a login/password
 -- persons are used for maintainer, submitter, commenter?
-drop table if exists People;
-create table People (
+drop table if exists people;
+create table people (
     id                bigint not null primary key auto_increment,
     
     user_name         varchar(63),
@@ -15,8 +15,8 @@
 );
     
 -- Ports represents a port: a piece of software
-drop table if exists Ports;
-create table Ports (
+drop table if exists ports;
+create table ports (
     id                bigint not null primary key auto_increment,
     
     name              varchar(63),
@@ -29,16 +29,16 @@
 );
     
 -- ports_maintainers: many-many association between Maintainers and Ports
-drop table if exists Maintainers_Ports;
-create table Maintainers_Ports (
+drop table if exists maintainers_ports;
+create table maintainers_ports (
     person_id         bigint not null,
     port_id           bigint not null
 );
     
 -- A PortPkg is an instance of build/install rules for a port.
 -- There may be many PortPkg for each Port
-drop table if exists Port_Pkgs;
-create table Port_Pkgs (
+drop table if exists port_pkgs;
+create table port_pkgs (
     id                bigint not null primary key auto_increment,
 
     port_id           bigint not null,
@@ -61,13 +61,13 @@
     
     -- (note that both pkgs and variants, have dependency relations)
 );
-create index pkg_submit_date on Port_Pkgs(submitted_at);
-create index pkg_submitter on Port_Pkgs(submitter_id);
-create index pkg_port_id on Port_Pkgs(port_id);
+create index pkg_submit_date on port_pkgs(submitted_at);
+create index pkg_submitter on port_pkgs(submitter_id);
+create index pkg_port_id on port_pkgs(port_id);
 
 
-drop table if exists Port_Pkg_Files;
-create table Port_Pkg_Files (
+drop table if exists port_pkg_files;
+create table port_pkg_files (
     id                  bigint not null primary key auto_increment,
     port_pkg_id         bigint not null,
     file_path           varchar(2047),
@@ -78,26 +78,26 @@
     
     download_count      int not null default 0
 );
-create index portpkgfile_pkgid on Port_Pkg_Files(port_pkg_id);
+create index portpkgfile_pkgid on port_pkg_files(port_pkg_id);
 
 
-drop table if exists File_Blobs;
-create table File_Blobs (
+drop table if exists file_blobs;
+create table file_blobs (
     id                  bigint not null primary key auto_increment,
     port_pkg_file_id    bigint not null,
     sequence            int not null,
     data                blob
 );
-create index fileblog_index on File_Blobs(port_pkg_file_id, sequence);
+create index fileblog_index on file_blobs(port_pkg_file_id, sequence);
 
 
 -- A tag which may be attached to various items through Ports_Tags, Port_Pkgs_Tags
-drop table if exists Tags;
-create table Tags (
+drop table if exists tags;
+create table tags (
     id                  bigint not null primary key auto_increment,
     name                varchar(31)
 );
-create unique index tagNames on Tags(name);
+create unique index tag_names on tags(name);
        
 -- many-many relationship between PortPkg and Tag
 drop table if exists Port_Pkgs_Tags;
@@ -107,15 +107,15 @@
 );
 
 -- many-many relationship between Port and Tag
-drop table if exists Ports_Tags;
-create table Ports_Tags (
+drop table if exists ports_tags;
+create table ports_tags (
     port_id             bigint not null,
     tag_id              bigint not null
 );
 
 -- Variant available to a PortPkg
-drop table if exists Variants;
-create table Variants (
+drop table if exists variants;
+create table variants (
     id                  bigint not null primary key auto_increment,
     port_pkg_id         bigint not null,
     
@@ -128,8 +128,8 @@
 );
 
 -- A dependency onto another port (not complete)
-drop table if exists Dependencies;
-create table Dependencies (
+drop table if exists dependencies;
+create table dependencies (
     id                  bigint not null primary key auto_increment,
     expression          text                -- textual? dependency expression
     
@@ -139,23 +139,23 @@
 );
 
 -- many-one relationship from Dependency to PortPkg
-drop table if exists Dependencies_Port_Pkgs;
-create table Dependencies_Port_Pkgs (
+drop table if exists dependencies_port_pkgs;
+create table dependencies_port_pkgs (
     package_id          bigint not null,
     dependency_id       bigint not null
 );
 
 -- many-one relationship from Variant to Dependency
-drop table if exists Dependencies_Variants;
-create table Dependencies_Variants (
+drop table if exists dependencies_variants;
+create table dependencies_variants (
     variant_id          bigint not null,
     dependency_id       bigint not null
 );
 
 
 -- Human comments on ports and portpkgs
-drop table if exists Comments;
-create table Comments (
+drop table if exists comments;
+create table comments (
     id                  bigint not null primary key auto_increment,
     commenter_id        bigint not null, -- many-one: Person
     comment             text,
@@ -164,24 +164,24 @@
 
 
 -- many-one relationship from Comment to Port
-drop table if exists Comments_Ports;
-create table Comments_Ports (
+drop table if exists comments_ports;
+create table comments_ports (
     comment_id          bigint not null,
     port_id             bigint not null
 );
 
 
 -- many-one relationship from Comment to PortPkg
-drop table if exists Comments_Port_Pkgs;
-create table Comments_Port_Pkgs (
+drop table if exists comments_port_pkgs;
+create table comments_port_pkgs (
     comment_id          bigint not null,
     port_pkg_id         bigint not null
 );
 
 
 -- Status reports on port_pkgs, perhaps machine submitted
-drop table if exists Status_Reports;
-create table Status_Reports (
+drop table if exists status_reports;
+create table status_reports (
     id                  bigint not null primary key auto_increment,
     reporter_id         bigint not null, -- many-one: Person
     report_type         int,
@@ -192,8 +192,8 @@
 
 
 -- many-one relationship from Status_Report to Port_Pkg
-drop table if exists Status_Reports_Port_Pkgs;
-create table Status_Reports_Port_Pkgs (
+drop table if exists status_reports_port_pkgs;
+create table status_reports_port_pkgs (
     status_report_id    bigint not null,
     port_pkg_id         bigint not null
 );

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070514/7fc977cc/attachment.html


More information about the macports-changes mailing list