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

source_changes at macosforge.org source_changes at macosforge.org
Sun May 13 21:47:51 PDT 2007


Revision: 25107
          http://trac.macosforge.org/projects/macports/changeset/25107
Author:   jberry at macports.org
Date:     2007-05-13 21:47:51 -0700 (Sun, 13 May 2007)

Log Message:
-----------
mpwa: add some default values to new fields

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

Modified: users/jberry/mpwa/doc/schema.sql
===================================================================
--- users/jberry/mpwa/doc/schema.sql	2007-05-14 04:30:12 UTC (rev 25106)
+++ users/jberry/mpwa/doc/schema.sql	2007-05-14 04:47:51 UTC (rev 25107)
@@ -2,12 +2,12 @@
 -- persons are used for maintainer, submitter, commenter?
 drop table if exists People;
 create table People (
-    id              bigint not null primary key auto_increment,
+    id                bigint not null primary key auto_increment,
     
-    user_name       varchar(63),
-    first_name      varchar(63),
-    last_name       varchar(63),
-    email           varchar(63)
+    user_name         varchar(63),
+    first_name        varchar(63),
+    last_name         varchar(63),
+    email             varchar(63)
     
     -- auth_method
     -- auth_token
@@ -16,12 +16,12 @@
 -- Ports represents a port: a piece of software
 drop table if exists Ports;
 create table Ports (
-    id              bigint not null primary key auto_increment,
+    id                bigint not null primary key auto_increment,
     
-    name            varchar(63),
-    short_desc      text,
-    long_desc       text,
-    home_page       varchar(255)
+    name              varchar(63),
+    short_desc        text,
+    long_desc         text,
+    home_page         varchar(255)
     
     -- many-many association for tags through ports_tags
     -- many-many association for maintainers through ports_maintainers
@@ -30,29 +30,29 @@
 -- ports_maintainers: many-many association between Maintainers and Ports
 drop table if exists Maintainers_Ports;
 create table Maintainers_Ports (
-    person_id       bigint not null,
-    port_id         bigint not null
+    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 (
-    id              bigint not null primary key auto_increment,
+    id                bigint not null primary key auto_increment,
 
-    port_id         bigint not null,
+    port_id           bigint not null,
     
-    submitted_at    datetime not null,
-    submitter_id    bigint not null, -- one-one: Person
-    submitter_notes text,
+    submitted_at      datetime not null,
+    submitter_id      bigint not null, -- one-one: Person
+    submitter_notes   text,
     
-    epoch           varchar(32),
-    version         varchar(32),
-    revision        varchar(32),
+    epoch             varchar(32),
+    version           varchar(32),
+    revision          varchar(32),
     
-    votes_for       int not null,
-    votes_against   int not null,
-    download_count  int not null
+    votes_for         int not null default 0,
+    votes_against     int not null default 0,
+    download_count    int not null default 0
                                     
     -- one-many association for variants
     -- many-many association for tags through PkgTagAssoc
@@ -75,7 +75,7 @@
     md5                 varchar(32),
     sha256              varchar(64),
     
-    download_count      int not null
+    download_count      int not null default 0
 );
 create index portpkgfile_pkgid on Port_Pkg_Files(port_pkg_id);
 

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


More information about the macports-changes mailing list