Commit 84445d99 authored by Lukáš Lalinský's avatar Lukáš Lalinský

Remove submission_id from fingerprint

parent 9901edc4
......@@ -59,7 +59,6 @@ def insert_fingerprint(conn, data):
'length': data['length'],
'bitrate': data.get('bitrate'),
'source_id': data.get('source_id'),
'submission_id': data.get('submission_id'),
'format_id': data.get('format_id'),
'track_id': data['track_id'],
'meta_id': data.get('meta_id'),
......
......@@ -66,7 +66,6 @@ def import_submission(conn, submission):
'length': submission['length'],
'bitrate': submission['bitrate'],
'source_id': submission['source_id'],
'submission_id': submission['id'],
'format_id': submission['format_id'],
'meta_id': submission['meta_id'],
}
......
......@@ -99,7 +99,6 @@ track_mbid = Table('track_mbid', metadata,
Column('track_id', Integer, ForeignKey('track.id'), primary_key=True),
Column('mbid', String, primary_key=True),
Column('created', DateTime),
Column('submission_id', Integer, ForeignKey('submission.id')),
Column('submission_count', Integer),
)
......
......@@ -52,7 +52,6 @@ CREATE TABLE fingerprint (
source_id int NOT NULL,
track_id int NOT NULL,
meta_id int,
submission_id int,
hash_full bytea,
hash_query bytea,
submission_count int NOT NULL
......
......@@ -7,6 +7,7 @@ ALTER TABLE submission ADD CONSTRAINT submission_fk_fingerprint_id
ALTER TABLE fingerprint ADD submission_count int;
ALTER TABLE fingerprint DROP COLUMN submission_id;
ALTER TABLE track_mbid ADD submission_count int ;
ALTER TABLE track_mbid DROP COLUMN submission_id;
CREATE TABLE track_puid (
track_id int NOT NULL,
......
......@@ -61,7 +61,6 @@ def test_import_submission(conn):
fingerprint = import_submission(conn, submission)
assert_equals(1, fingerprint['id'])
assert_equals(5, fingerprint['track_id'])
assert_equals(id, fingerprint['submission_id'])
query = tables.submission.select(tables.submission.c.id == id)
submission = conn.execute(query).fetchone()
assert_true(submission['handled'])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment