Commit Graph

32 Commits

Author SHA1 Message Date
Jelle van der Waa
b911b3308e Remove all squashed migrations
this makes it easier to upgrade to Python 3 since less on_delete lines
have to be fixed.
2019-01-21 21:19:58 +01:00
Jelle van der Waa
3fc26cdb27 Squash all migrations 2018-11-17 21:58:50 +01:00
Jelle van der Waa
a215f25efa releng: Fix django warnings
Fixes warnings for releng.Test.modules and releng.Test.rollback_modules
(fields.W340) null has no effect on ManyToManyField.
2017-05-24 09:06:28 +02:00
Angel Velasquez
49828ba2cb Add missing migration from ad0bddb209
Signed-off-by: Angel Velasquez <angvp@archlinux.org>
2016-07-31 05:57:15 +00:00
Dan McGee
0896b5697a Add auto-generated migrations from new Django migrations framework
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-09-01 18:26:05 -05:00
Dan McGee
51d90e23c9 Remove old south migrations
Django 1.7 has built-in migrations support, so we no longer want these
around. All existing installs should be fully migrated at this point to
the latest schema.

Signed-off-by: Dan McGee <dan@archlinux.org>
2014-09-01 18:26:05 -05:00
Dan McGee
b7b2474064 Various minor code cleanups and fixes
Most of these were suggested by PyCharm, and include everything from
little syntax issues and other bad smells to dead or bad code.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-16 22:12:01 -05:00
Dan McGee
32e3e24bbc Drop old flag request version column
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-08 22:22:24 -05:00
Dan McGee
b425b192e1 Migrate flag request version info to new format
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-08 22:21:05 -05:00
Dan McGee
411ccfb3c7 Begin split of flag request version column into parts
Not sure why on only this one I decided to put all three parts in the
same column. We don't do this anywhere else.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-08 22:04:07 -05:00
Dan McGee
4c02b11cd6 Remove optional package depends column
This is now completely replaced by the deptype column.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-04 15:11:27 -05:00
Dan McGee
a64bbbd413 Make adjustments for optional -> deptype conversion
Very little dealt directly with this field.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-04 15:11:27 -05:00
Dan McGee
566a9803dd Add new deptype column to package depends
This is more flexible than our existing 'optional' boolean and will
allow us to import check and make depends into the database as well as
what we are already doing.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-31 20:07:15 -05:00
Dan McGee
61b4098c61 Add index on package updates pkgname field
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-24 08:55:48 -05:00
Dan McGee
34e877d332 Add indexes on 'created' field to several package-related models
These models regularly sort by or limit by the created field, so adding
a index on the created database column makes sense.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-01 20:35:34 -05:00
Dan McGee
43b5c29b3d Add new package Update model
This will be used to track updates to package as we do them during
reporead. By storing enough relevant fields from the package object, we
should be able to produce a useful report on a regular basis of what has
been happening in the repositories.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-01 20:21:23 -05:00
Dan McGee
cc44fdbea5 Migrate package depends data into new model
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-18 21:36:11 -05:00
Dan McGee
ef561bcd70 Add new depends model
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-18 21:36:11 -05:00
Dan McGee
4e1e28729f Use GenericIPAddressField in flag request ip_address
New (and slightly odd with regards to verbose_name) in Django 1.4. This
simply ensures a deployment in an IPv6 environment actually works as
expected. If you were using PostgreSQL as a database backend, you won't
be affected by this as the 'inet' type was already used, but at least
now you can edit the values in the admin without getting an error.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-27 09:12:26 -05:00
Dan McGee
90e08b4863 Make all datetime objects fully timezone aware
This is most of the transition to Django 1.4 `USE_TZ = True`. We need to
ensure we don't mix aware and non-aware datetime objects when dealing
with datetimes in the code. Add a utc_now() helper method that we can
use most places, and ensure there is always a timezone attached when
necessary.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-23 19:54:40 -05:00
Dan McGee
b2b5c1a064 Add old version string to saved flag requests
This makes it easier to match up a flag request with the package state
at the time of flagging, and might also help to determine if flagging
actions were legit. We only store it if it is the same across all
packages to be marked.

Also, move the various database write activities when flagging packages
into a single transaction.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-10 23:31:11 -06:00
Dan McGee
3e094a548f Add a new FlagRequest model
This will be used to store all of the submitted data we get via flag out
of date forms on the website.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-08 15:02:11 -06:00
Dan McGee
12408702ea Allow population of signoff specs with SVN commit messages
This pulls them from the latest SVN commit on trunk. We don't have a
failproof method of getting the exact right commit, but this should be
close if it is run on a regular basis via cron (aka hourly).

Note that running locally, I needed the development version of South to
get the migration included here to apply because of information_schema
changes in the current version of MySQL.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-14 12:27:38 -06:00
Dan McGee
ac2278423a Many signoff page improvements
Add a new 'SignoffSpecification' model which will capture metadata
regarding a specific package if it differs from the norm- e.g. more or
less than 2 required signoffs, is known to be bad, a comment from the
maintainer, etc. The groundwork is laid here; much of this will still
need to be wired up in the future.

Enhance the view with a lot more JS prettiness and add revoking of
signoffs. The signoff page can be filtered and the links and all the fun
stuff are totally dynamic now.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-03 17:19:26 -05:00
Dan McGee
82cb7c3586 Add index to package groups name field
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-29 12:26:27 -05:00
Dan McGee
ba975112cb Add new packages signoff model
This one is centered around pkgbase, much as our PackageRelation object
is. However, it also tracks all of the versioning fields we have in
order to making joining against the current package testing list
possible. Finally, additional metadata including a created date, an
(optional) revoke date, and a comments field are added.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-06 11:27:33 -05:00
Dan McGee
ef9faf4414 Add a created date to package relations
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-03 14:41:00 -05:00
Dan McGee
97437d27b7 Add new package parts models
This allows us to store conflicts, provisions (provides), and replacements
in the database, things we weren't capturing before. All can be multivalued,
just like License and PackageGroup.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-23 15:44:41 -05:00
Dan McGee
4444f25d5c Move license to a related model
This allows us to store multiple licenses per package in a more elegant
fashion, and will later allow us to search and filter on this information.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-15 13:51:11 -06:00
Dan McGee
63696563a3 Add package groups model and display to packages
They show up but aren't hotlinked to anything...just yet.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-25 15:49:06 -05:00
Dan McGee
e361a1e873 Get unit tests up and running again
We had some dependency issues between migrations that needed to be
explicitly defined in order to get things fully moving, and do to some
braindeadness in Django tests not including the project url config, we need
to do some clever business when using the url tag in the base template so
tests don't doe with a NoReverseMatch exception.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-24 17:08:00 -05:00
Dan McGee
fe832ea845 Move package maintainer off of package model
This is an attempt to fix our long-standing problems dealing with maintainer
information. Move the actual maintainer information off of the package model
into a PackageRelation object, which has some flexibility to later represent
more than just maintainership.

This solves multiple problems:
* If a package gets accidentally deleted, so did the maintainer info
* Testing packages have always shown up as orphans
* With split packages, it was easy to miss some of the sub-packages

This commit does not include the deletion of the original maintainer column;
that will come at a later time when I feel more confident that the data was
migrated correctly.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-27 16:15:20 -05:00