Link
- class django_musicbrainz_connector.models.Link(*args, **kwargs)[source]
PostgreSQL Definition
The
linktable is defined in the MusicBrainz Server as:CREATE TABLE link ( -- replicate id SERIAL, link_type INTEGER NOT NULL, -- references link_type.id begin_date_year SMALLINT, begin_date_month SMALLINT, begin_date_day SMALLINT, end_date_year SMALLINT, end_date_month SMALLINT, end_date_day SMALLINT, attribute_count INTEGER NOT NULL DEFAULT 0, created TIMESTAMP WITH TIME ZONE DEFAULT NOW(), ended BOOLEAN NOT NULL DEFAULT FALSE CONSTRAINT link_ended_check CHECK ( ( -- If any end date fields are not null, then ended must be true (end_date_year IS NOT NULL OR end_date_month IS NOT NULL OR end_date_day IS NOT NULL) AND ended = TRUE ) OR ( -- Otherwise, all end date fields must be null (end_date_year IS NULL AND end_date_month IS NULL AND end_date_day IS NULL) ) ) );