summaryrefslogtreecommitdiffstats
path: root/support/schema/gendummydata.py
AgeCommit message (Collapse)AuthorFilesLines
2012-07-06gendummydata.py: Add ability to generate dummy trusted user proposalscanyonknight1-0/+26
* Introduce ability to specify number of open and closed dummy trusted user proposals * First step for eventually adding dummy votes for proposals Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-06gendummydata.py: Change variable to string to eliminate redundant codecanyonknight1-11/+5
There is no reason the MaintainerUID can't be treated as a string within this script. By changing to a string an "if" statement can be eliminated. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-06gendummydata.py: Remove unused variablescanyonknight1-7/+0
Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-06gendummydata.py: Add check for command generating dummy commentscanyonknight1-1/+7
* Exit with an error if fortune command isn't found * No reason to enforce the "-l" option from the fortune command Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-13Make "gendummydata.py" Python 3 compliant.Lukas Fleischer1-14/+14
* Transform into valid Python 3.x code using 2to3. * Change shebang from "/usr/bin/python2" to "/usr/bin/python3". * Invoke with "python3" instead of "python2" in "reloadtestdb.sh". Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-12Fix dependency generation in "gendummydata.py".Lukas Fleischer1-2/+2
Package dependencies are no longer stored as references to the "Packages" table but kept directly in "PackageDepends", so the dummy data generation script should be fixed to create package names instead of references, also. Regression introduced in commit 7c91c592458b7532806ef75fe09146f82f085f3b. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-12wrap long SQL commands to improve formatting and readabilityelij1-11/+23
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-12replace print statements with logging module in gendummydataelij1-40/+22
use the logging module instead of writing directly to stderr this makes the code cleaner as it removes the numerous tests for the value of DBUG, yet allows devs to control the level of output verbosity. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-12remove mysql dependency from gendummydataelij1-41/+3
- remove need to use mysql for escaping the sql -- removing single quote should be enough - instead of using sql to fetch categories from a live database, simply consider categories an integer range, specified to the size of that in the aur-schema. Lukas: Add "CATEGORIES_COUNT" initialization. Fix random number range used in genCategory() (AUTO_INCREMENT columns are 1-based by default, not 0-based). Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-30gendummydata.py: Do not touch output file until we need it.Lukas Fleischer1-5/+5
Ensures there's no leftover (empty) file if something during initialization fails. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-04Allow DB connection values to come from the environmentDan McGee1-12/+12
Stop hardcoding everything everywhere for those of us that don't use the localhost/aur/aur/AUR setup. Also allow for the dummy data to be created in the reload script if it does not exist. Finally, remove two assumptions that the AUR database already exists. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-04Use a single transaction to write dummy dataDan McGee1-0/+2
This is immensely faster when using InnoDB since we don't need to sync after each and every INSERT statement. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-27Fix some minor bugs in "support/schema/gendummydata.py".Lukas Fleischer1-2/+2
The dummy data generation script used to create wrong package IDs for both "PackageVotes" and "PackageDepends" tables which led to errors when reloading the test data (constraints failed). This is fixed by no longer creating entries with zero ("0") package IDs. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-27Define "Packages.SubmitterUID" and "Packages.MaintainerUID" as "NULL".Lukas Fleischer1-1/+6
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-01Drop "PackageContents" table and references.Lukas Fleischer1-28/+0
We don't even touch source tarballs anymore - except for extracting the PKGBUILD, so this is no longer needed. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-01Drop PackageLocations table and referencesDan McGee1-78/+28
We don't need this anymore since all packages managed here are well...managed here. Rip out all of the places we were using this field, many of which depended on the magic value '2' anyway. On the display side of things, we had a column that was always showing 'unsupported' that is now gone, and you can no longer sort by this column. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-01-24Use "python2" shebang for "newpackage-notify" and "gendummydata.py".Lukas Fleischer1-1/+1
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-01-24Build URLs from package names (fixes FS#15308, FS#19327).Lukas Fleischer1-14/+8
Drop the "URLPath" field from the "Packages" table, build URLs from package names instead. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2008-03-27Remove references to AURMaintainerUIDCallan Barrett1-2/+2
This (should) get rid of anything to do with the unused column AURMaintainerUID in the scripts and schema files Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com> Signed-off-by: Simo Leone <simo@archlinux.org>
2008-03-23Generate valid dummy data entriesLoui Chang1-12/+5
Signed-off-by: Loui Chang <louipc.ist@gmail.com> Signed-off-by: Simo Leone <simo@archlinux.org>
2005-03-06started working on pkgedit for commentseric1-2/+2
2005-03-05started working on package commentseric1-6/+32
2005-01-24fixed dummy-data, schema, gendummydata to use md5 passwordseric1-9/+9
2004-07-13started on the package submit scripteric1-4/+10
2004-07-02still working on pkgsearch.php::do_Detailseric1-0/+38
2004-06-29yet another schema changeeric1-11/+13
2004-06-28re-working pkgsearch, NumVotes add to Packages tableeric1-4/+14
2004-06-28working on action box for packageseric1-53/+23
2004-06-25improved dummy data, sorting works on package listing, still need Less/More ↵eric1-32/+134
buttons and package operations (details, manage, out-of-date)
2004-06-23added dummy data for testingeric1-0/+253