[Pypi-checkins] r742 - branches/tarek-pep-345-support
tarek.ziade
python-checkins at python.org
Sun Mar 14 16:20:07 CET 2010
Author: tarek.ziade
Date: Sun Mar 14 16:20:06 2010
New Revision: 742
Modified:
branches/tarek-pep-345-support/pkgbase_schema.sql
Log:
fixed all mistakes in the script so it actually works to create a DB from scratch
Modified: branches/tarek-pep-345-support/pkgbase_schema.sql
==============================================================================
--- branches/tarek-pep-345-support/pkgbase_schema.sql (original)
+++ branches/tarek-pep-345-support/pkgbase_schema.sql Sun Mar 14 16:20:06 2010
@@ -1,10 +1,10 @@
-- Table structure for table: users
-CREATE TABLE users (
- name TEXT PRIMARY KEY,
- password TEXT,
- email TEXT,
+CREATE TABLE users (
+ name TEXT PRIMARY KEY,
+ password TEXT,
+ email TEXT,
gpg_keyid TEXT,
- last_login TIMESTAMP,
+ last_login TIMESTAMP
);
CREATE INDEX users_email_idx ON users(email);
@@ -12,7 +12,7 @@
CREATE TABLE openids (
id TEXT PRIMARY KEY,
- name TEXT REFERENCES users,
+ name TEXT REFERENCES users
);
CREATE TABLE openid_sessions (
@@ -41,7 +41,7 @@
CREATE TABLE cookies (
cookie text PRIMARY KEY,
name text references users,
- last_seen timestamp,
+ last_seen timestamp
);
CREATE INDEX cookies_last_seen ON cookies(last_seen);
@@ -122,7 +122,7 @@
-- Table structure for table: releases
-CREATE TABLE releases (
+CREATE TABLE releases (
name TEXT REFERENCES packages ON UPDATE CASCADE,
version TEXT,
author TEXT,
@@ -142,9 +142,6 @@
cheesecake_code_kwalitee_id INTEGER REFERENCES cheesecake_main_indices,
_pypi_ordering INTEGER,
_pypi_hidden BOOLEAN,
- cheesecake_installability_id INTEGER REFERENCES cheesecake_main_indices,
- cheesecake_documentation_id INTEGER REFERENCES cheesecake_main_indices,
- cheesecake_code_kwalitee_id INTEGER REFERENCES cheesecake_main_indices,
PRIMARY KEY (name, version)
);
CREATE INDEX release_pypi_hidden_idx ON releases(_pypi_hidden);
@@ -153,7 +150,7 @@
-- l2, l3, l4, l5 is the corresponding parent;
-- 0 if there is no parent on that level (each node is its
-- own parent)
-CREATE TABLE trove_classifiers (
+CREATE TABLE trove_classifiers (
id INTEGER PRIMARY KEY,
classifier TEXT UNIQUE,
l2 INTEGER,
@@ -371,7 +368,7 @@
in_reply_to INTEGER REFERENCES comments ON DELETE CASCADE
);
CREATE TABLE ratings(
- id SERIAL UNIQUE;
+ id SERIAL UNIQUE,
name TEXT,
version TEXT,
user_name TEXT REFERENCES users ON DELETE CASCADE,
More information about the Pypi-checkins
mailing list