Make stackbuilder dependencies into a comma separated textfield

The "true dependencies" usign db relationships were too strict for
reality - multiple entries can have the same textid, and that's what
we need to depend on. Resolving it for platform is handled in the
StackBuilder client.

This update requires the following SQL to be run in the database:
DROP TABLE downloads_stackbuilderapp_dependencies;
ALTER TABLE downloads_stackbuilderapp ADD COLUMN txtdependencies varchar(1000) NOT NULL DEFAULT '';
ALTER TABLE downloads_stackbuilderapp ALTER COLUMN txtdependencies DROP DEFAULT;

Closes #167
This commit is contained in:
Magnus Hagander
2012-07-11 11:42:18 +02:00
parent 24ff36eb28
commit 355b187d78
3 changed files with 33 additions and 5 deletions

View File

@ -125,7 +125,9 @@ class StackBuilderApp(models.Model):
checksum = models.CharField(max_length=32, null=False, blank=False)
mirrorpath = models.CharField(max_length=500, null=False, blank=True)
alturl = models.URLField(max_length=500, null=False, blank=True)
dependencies = models.ManyToManyField("self", blank=True)
txtdependencies = models.CharField(max_length=1000, null=False, blank=True,
verbose_name='Dependencies',
help_text='Comma separated list of text dependencies, no spaces!')
versionkey = models.CharField(max_length=500, null=False, blank=False)
def __unicode__(self):