Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LDV Specification
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ASTRON SDC
LDV Specification
Commits
a15a9cd6
Commit
a15a9cd6
authored
2 years ago
by
Fanna Lautenbach
Browse files
Options
Downloads
Patches
Plain Diff
change JSONField to postgres JSONField to work with json blobs
parent
601e61da
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!44
change JSONField to postgres JSONField to work with json blobs
Pipeline
#41418
failed
2 years ago
Stage: test
Stage: build
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ldvspec/lofardata/migrations/0014_alter_dataproduct_additional_meta.py
+19
-0
19 additions, 0 deletions
...data/migrations/0014_alter_dataproduct_additional_meta.py
ldvspec/lofardata/models.py
+2
-3
2 additions, 3 deletions
ldvspec/lofardata/models.py
with
21 additions
and
3 deletions
ldvspec/lofardata/migrations/0014_alter_dataproduct_additional_meta.py
0 → 100644
+
19
−
0
View file @
a15a9cd6
# Generated by Django 3.2 on 2022-12-15 15:01
import
django.contrib.postgres.fields.jsonb
from
django.db
import
migrations
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'
lofardata
'
,
'
0013_auto_20221214_1338
'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'
dataproduct
'
,
name
=
'
additional_meta
'
,
field
=
django
.
contrib
.
postgres
.
fields
.
jsonb
.
JSONField
(),
),
]
This diff is collapsed.
Click to expand it.
ldvspec/lofardata/models.py
+
2
−
3
View file @
a15a9cd6
import
logging
import
logging
from
celery.result
import
AsyncResult
from
celery.result
import
AsyncResult
from
django.contrib.auth.models
import
User
from
django.contrib.auth.models
import
User
from
django.contrib.postgres.fields
import
ArrayField
from
django.contrib.postgres.fields
import
ArrayField
,
JSONField
from
django.db
import
models
,
IntegrityError
from
django.db
import
models
,
IntegrityError
from
django.utils.translation
import
gettext_lazy
as
_
from
django.utils.translation
import
gettext_lazy
as
_
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
...
@@ -18,7 +17,7 @@ class DataProduct(models.Model):
...
@@ -18,7 +17,7 @@ class DataProduct(models.Model):
activity
=
models
.
CharField
(
max_length
=
50
)
activity
=
models
.
CharField
(
max_length
=
50
)
surl
=
models
.
CharField
(
max_length
=
200
,
unique
=
True
)
surl
=
models
.
CharField
(
max_length
=
200
,
unique
=
True
)
filesize
=
models
.
PositiveBigIntegerField
()
filesize
=
models
.
PositiveBigIntegerField
()
additional_meta
=
models
.
JSONField
()
additional_meta
=
models
.
JSONField
@staticmethod
@staticmethod
def
insert_dataproduct
(
def
insert_dataproduct
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment