FEATURE: Pools #12

Closed
opened 2024-10-12 22:26:19 +00:00 by Alphyron · 1 comment
Owner

We want pools, because pools are fancy

New Tables (Please fix typos and syntax errors, just for structure):

CREATE TYPE pool_category AS ENUM ('series', 'collection');

CREATE TABLE `Pool` (
  `id` CHAR(25) PRIMARY KEY,
  `name`  VARCHAR(75),
  `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `deleted_at` TIMESTAMP NULL,
  `category` POOL_CATEGORY NOT NULL  
);

CREATE TABLE PoolPost (
  `pool_id` CHAR(25) REFERENCES Pool(id),
  `post_id` CHAR(25) REFERENCES Post(id),
  `order_position` INT NOT NULL DEFAULT 0,
  PRIMARY KEY (`pool_id`, `post_id`)
);

CREATE TABLE PoolReference(
  `pool_id` CHAR(25) REFERENCES Pool(id),
  `source_id` CHAR(25) REFERENCES Source(id),
  `url` TEXT NOT NULL,
  PRIMARY KEY (pool_id, source_id, url)
);

As always please with basic crud operations

We want pools, because pools are fancy New Tables (Please fix typos and syntax errors, just for structure): ```sql CREATE TYPE pool_category AS ENUM ('series', 'collection'); CREATE TABLE `Pool` ( `id` CHAR(25) PRIMARY KEY, `name` VARCHAR(75), `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `deleted_at` TIMESTAMP NULL, `category` POOL_CATEGORY NOT NULL ); CREATE TABLE PoolPost ( `pool_id` CHAR(25) REFERENCES Pool(id), `post_id` CHAR(25) REFERENCES Post(id), `order_position` INT NOT NULL DEFAULT 0, PRIMARY KEY (`pool_id`, `post_id`) ); CREATE TABLE PoolReference( `pool_id` CHAR(25) REFERENCES Pool(id), `source_id` CHAR(25) REFERENCES Source(id), `url` TEXT NOT NULL, PRIMARY KEY (pool_id, source_id, url) ); ``` As always please with basic crud operations
SoXX was assigned by Alphyron 2024-10-12 22:26:19 +00:00
SoXX added reference dev/pools 2024-10-14 10:24:16 +00:00
Owner

Merged

Merged
SoXX closed this issue 2024-10-15 09:04:15 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Anthrove/otter-space-sdk#12
No description provided.