Skip to content
This repository has been archived by the owner on Nov 14, 2020. It is now read-only.

Commit

Permalink
[refs #95885] Add location on File
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-duhnea committed Jun 14, 2018
1 parent cbe5bfb commit e6933f8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
31 changes: 31 additions & 0 deletions search/migrations/0008_auto_20180614_0932.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-06-14 09:32
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('search', '0007_auto_20180613_0837'),
]

operations = [
migrations.AddField(
model_name='file',
name='location',
field=models.TextField(blank=True, null=True),
),
migrations.AlterField(
model_name='file',
name='document',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='file', to='search.Document'),
),
migrations.AlterField(
model_name='geographicbounds',
name='document',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='geo_bounds', to='search.Document'),
),
]
1 change: 1 addition & 0 deletions search/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ def save_metadata_records(cls, records):

class File(models.Model):
document = models.ForeignKey(Document, blank=True, null=True, related_name='file')
location = models.TextField(blank=True, null=True)
external_link = models.TextField(blank=True, null=True)
file_size = models.IntegerField(blank=True, null=True)
file_type = models.ForeignKey(DFileType, blank=True, null=True)
Expand Down

0 comments on commit e6933f8

Please sign in to comment.