Skip to content

Database changes for Resources #173

Description

@yellalena
  • Update tags_assigned table to have resource in the assigned_to enum via knex migration
  • Add resources table with relevant relations via knex migration
    • Add constraint to ensure that Every resource should have either a Description or an Attachment (link, filename)
    • Check if it’s possible (and if it makes sense) to add a db constraint to ensure:
      For type = 'post' → description required
      For type = 'video' → link required
  • Update db diagram in the repo

Table resources:
id: int (primary key)
title: VARCHAR(255) NOT NULL
type: ENUM('post', 'video', ‘picture’, ‘link’, ‘file’) NOT NULL
audience: ENUM('public', 'member', 'mentor') NOT NULL
tags: relation to (‘tags_assigned’) table
description: TEXT
attachment_filename: VARCHAR(255)
link: VARCHAR(500)
created_by: UUID (foreign key to users.id)
created_at: TIMESTAMP
updated_at: TIMESTAMP

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Dev Complete

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions