summaryrefslogtreecommitdiffstats
path: root/support/schema
diff options
context:
space:
mode:
authoreric <eric>2005-01-24 22:03:44 +0100
committereric <eric>2005-01-24 22:03:44 +0100
commit9641fdc735640af82606ee9b6a60a1cb3c046d16 (patch)
tree54a65ae53f39bcd553c78330eb3f8036a25debbd /support/schema
parent8d2dfcb24874cd9a8797d0648e1da74e063a03c1 (diff)
downloadaur-9641fdc735640af82606ee9b6a60a1cb3c046d16.tar.gz
aur-9641fdc735640af82606ee9b6a60a1cb3c046d16.tar.xz
fixed dummy-data, schema, gendummydata to use md5 passwords
Diffstat (limited to 'support/schema')
-rw-r--r--support/schema/aur-schema.sql6
-rw-r--r--support/schema/dummy-data.sql.bz2bin784649 -> 782282 bytes
-rwxr-xr-xsupport/schema/gendummydata.py18
3 files changed, 12 insertions, 12 deletions
diff --git a/support/schema/aur-schema.sql b/support/schema/aur-schema.sql
index 13e83d17..0b07038e 100644
--- a/support/schema/aur-schema.sql
+++ b/support/schema/aur-schema.sql
@@ -40,11 +40,11 @@ CREATE TABLE Users (
);
-- A default developer account for testing purposes
INSERT INTO Users (ID, AccountTypeID, Username, Email, Passwd) VALUES (
- 1, 3, 'dev', 'dev@localhost', 'dev');
+ 1, 3, 'dev', 'dev@localhost', MD5('dev'));
INSERT INTO Users (ID, AccountTypeID, Username, Email, Passwd) VALUES (
- 2, 2, 'tu', 'tu@localhost', 'tu');
+ 2, 2, 'tu', 'tu@localhost', MD5('tu'));
INSERT INTO Users (ID, AccountTypeID, Username, Email, Passwd) VALUES (
- 3, 1, 'user', 'user@localhost', 'user');
+ 3, 1, 'user', 'user@localhost', MD5('user'));
-- Track Users logging in/out of AUR web site.
diff --git a/support/schema/dummy-data.sql.bz2 b/support/schema/dummy-data.sql.bz2
index a97c77d8..adace13e 100644
--- a/support/schema/dummy-data.sql.bz2
+++ b/support/schema/dummy-data.sql.bz2
Binary files differ
diff --git a/support/schema/gendummydata.py b/support/schema/gendummydata.py
index 738b99d9..02299b57 100755
--- a/support/schema/gendummydata.py
+++ b/support/schema/gendummydata.py
@@ -209,7 +209,7 @@ for u in user_keys:
#
pass
- s = "INSERT INTO Users (ID, AccountTypeID, Username, Email, Passwd) VALUES (%d, %d, '%s', '%s@example.com', '%s');\n" % (seen_users[u], account_type, u, u, u)
+ s = "INSERT INTO Users (ID, AccountTypeID, Username, Email, Passwd) VALUES (%d, %d, '%s', '%s@example.com', MD5('%s'));\n" % (seen_users[u], account_type, u, u, u)
out.write(s)
if count % 10 == 0:
if DBUG: print ".",
@@ -248,35 +248,35 @@ for p in seen_pkgs.keys():
if location_id == 1: # Unsupported - just a PKGBUILD and maybe other stuff
others = random.randrange(0,3)
- s = "INSERT INTO PackageContents (PackageID, FileName, Path, FileSize) VALUES (%d, '%s', '%s', %d);\n" % (seen_pkgs[p], "PKGBUILD", "/home/aur/incoming/%s/PKGBUILD" % p,
+ s = "INSERT INTO PackageContents (PackageID, URLPath, FSPath, FileSize) VALUES (%d, '%s', '%s', %d);\n" % (seen_pkgs[p], "PKGBUILD", "/home/aur/incoming/%s/PKGBUILD" % p,
random.randrange(0,999))
out.write(s)
if others == 0:
- s = "INSERT INTO PackageContents (PackageID, FileName, Path, FileSize) VALUES (%d, '%s', '%s', %d);\n" % (seen_pkgs[p], "%s.patch" % p,
+ s = "INSERT INTO PackageContents (PackageID, URLPath, FSPath, FileSize) VALUES (%d, '%s', '%s', %d);\n" % (seen_pkgs[p], "%s.patch" % p,
"/home/aur/incoming/%s/%s.patch" % (p,p),
random.randrange(0,999))
out.write(s)
elif others == 1:
- s = "INSERT INTO PackageContents (PackageID, FileName, Path, FileSize) VALUES (%d, '%s', '%s', %d);\n" % (seen_pkgs[p], "%s.patch" % p,
+ s = "INSERT INTO PackageContents (PackageID, URLPath, FSPath, FileSize) VALUES (%d, '%s', '%s', %d);\n" % (seen_pkgs[p], "%s.patch" % p,
"/home/aur/incoming/%s/%s.patch" % (p,p),
random.randrange(0,999))
out.write(s)
- s = "INSERT INTO PackageContents (PackageID, FileName, Path, FileSize) VALUES (%d, '%s', '%s', %d);\n" % (seen_pkgs[p], "arch.patch",
+ s = "INSERT INTO PackageContents (PackageID, URLPath, FSPath, FileSize) VALUES (%d, '%s', '%s', %d);\n" % (seen_pkgs[p], "arch.patch",
"/home/aur/incoming/%s/arch.patch" % p,
random.randrange(0,999))
out.write(s)
elif others == 2:
- s = "INSERT INTO PackageContents (PackageID, FileName, Path, FileSize) VALUES (%d, '%s', '%s', %d);\n" % (seen_pkgs[p], "%s.patch" % p,
+ s = "INSERT INTO PackageContents (PackageID, URLPath, FSPath, FileSize) VALUES (%d, '%s', '%s', %d);\n" % (seen_pkgs[p], "%s.patch" % p,
"/home/aur/incoming/%s/%s.patch" % (p,p),
random.randrange(0,999))
out.write(s)
- s = "INSERT INTO PackageContents (PackageID, FileName, Path, FileSize) VALUES (%d, '%s', '%s', %d);\n" % (seen_pkgs[p], "arch.patch",
+ s = "INSERT INTO PackageContents (PackageID, URLPath, FSPath, FileSize) VALUES (%d, '%s', '%s', %d);\n" % (seen_pkgs[p], "arch.patch",
"/home/aur/incoming/%s/arch.patch" % p,
random.randrange(0,999))
out.write(s)
- s = "INSERT INTO PackageContents (PackageID, FileName, Path, FileSize) VALUES (%d, '%s', '%s', %d);\n" % (seen_pkgs[p], "%s.install" % p,
+ s = "INSERT INTO PackageContents (PackageID, URLPath, FSPath, FileSize) VALUES (%d, '%s', '%s', %d);\n" % (seen_pkgs[p], "%s.install" % p,
"/home/aur/incoming/%s/%s.install" % (p,p),
random.randrange(0,999))
out.write(s)
@@ -306,7 +306,7 @@ for p in seen_pkgs.keys():
path = loc + "/" + p
if not files.has_key(path):
files[path] = 1
- s = "INSERT INTO PackageContents (PackageID, FileName, Path, FileSize) VALUES (%d, '%s', '%s', %d);\n" % (seen_pkgs[p], os.path.basename(path), path,
+ s = "INSERT INTO PackageContents (PackageID, URLPath, FSPath, FileSize) VALUES (%d, '%s', '%s', %d);\n" % (seen_pkgs[p], os.path.basename(path), path,
random.randrange(0,99999999))
out.write(s)
if DBUG: print "."