removed root_post_id, added options to post

This commit is contained in:
leca 2023-11-03 21:09:27 +03:00
parent 11dcfd6c2f
commit 5a229b3f13
2 changed files with 25 additions and 27 deletions

View File

@ -1,6 +1,6 @@
<mxfile host="Electron" modified="2023-10-24T20:22:25.901Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/22.0.2 Chrome/114.0.5735.289 Electron/25.8.4 Safari/537.36" etag="PYxiMayFbUWG-9iEeUeq" version="22.0.2" type="device">
<mxfile host="Electron" modified="2023-11-03T18:08:15.917Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/22.0.2 Chrome/114.0.5735.289 Electron/25.8.4 Safari/537.36" etag="CDK1Nj4BgjkxmFgBeclm" version="22.0.2" type="device">
<diagram id="R2lEEEUBdFMjLlhIrx00" name="Page-1">
<mxGraphModel dx="1669" dy="479" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0" extFonts="Permanent Marker^https://fonts.googleapis.com/css?family=Permanent+Marker">
<mxGraphModel dx="1839" dy="578" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0" extFonts="Permanent Marker^https://fonts.googleapis.com/css?family=Permanent+Marker">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
@ -278,21 +278,8 @@
<mxRectangle width="220" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="C-vyLk0tnHw3VtMMgP7b-6" value="" style="shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" parent="C-vyLk0tnHw3VtMMgP7b-2" vertex="1">
<mxGeometry y="90" width="250" height="30" as="geometry" />
</mxCell>
<mxCell id="C-vyLk0tnHw3VtMMgP7b-7" value="" style="shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;" parent="C-vyLk0tnHw3VtMMgP7b-6" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="C-vyLk0tnHw3VtMMgP7b-8" value="root_post_id int NOT NULL" style="shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;" parent="C-vyLk0tnHw3VtMMgP7b-6" vertex="1">
<mxGeometry x="30" width="220" height="30" as="geometry">
<mxRectangle width="220" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="IqcACfFecUyFIL0cjSVW-37" value="" style="shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" parent="C-vyLk0tnHw3VtMMgP7b-2" vertex="1">
<mxGeometry y="120" width="250" height="30" as="geometry" />
<mxGeometry y="90" width="250" height="30" as="geometry" />
</mxCell>
<mxCell id="IqcACfFecUyFIL0cjSVW-38" value="" style="shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;" parent="IqcACfFecUyFIL0cjSVW-37" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
@ -304,33 +291,46 @@
<mxRectangle width="220" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="x74P35Y3yzVWP2ge3KBl-1" value="" style="shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="C-vyLk0tnHw3VtMMgP7b-2">
<mxCell id="x74P35Y3yzVWP2ge3KBl-1" value="" style="shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" parent="C-vyLk0tnHw3VtMMgP7b-2" vertex="1">
<mxGeometry y="120" width="250" height="30" as="geometry" />
</mxCell>
<mxCell id="x74P35Y3yzVWP2ge3KBl-2" value="" style="shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;" parent="x74P35Y3yzVWP2ge3KBl-1" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="x74P35Y3yzVWP2ge3KBl-3" value="is_locked boolean NOT NULL" style="shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;" parent="x74P35Y3yzVWP2ge3KBl-1" vertex="1">
<mxGeometry x="30" width="220" height="30" as="geometry">
<mxRectangle width="220" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="x74P35Y3yzVWP2ge3KBl-4" value="" style="shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" parent="C-vyLk0tnHw3VtMMgP7b-2" vertex="1">
<mxGeometry y="150" width="250" height="30" as="geometry" />
</mxCell>
<mxCell id="x74P35Y3yzVWP2ge3KBl-2" value="" style="shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;" vertex="1" parent="x74P35Y3yzVWP2ge3KBl-1">
<mxCell id="x74P35Y3yzVWP2ge3KBl-5" value="" style="shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;" parent="x74P35Y3yzVWP2ge3KBl-4" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="x74P35Y3yzVWP2ge3KBl-3" value="is_locked boolean NOT NULL" style="shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;" vertex="1" parent="x74P35Y3yzVWP2ge3KBl-1">
<mxCell id="x74P35Y3yzVWP2ge3KBl-6" value="is_pinned boolean NOT NULL" style="shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;" parent="x74P35Y3yzVWP2ge3KBl-4" vertex="1">
<mxGeometry x="30" width="220" height="30" as="geometry">
<mxRectangle width="220" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="x74P35Y3yzVWP2ge3KBl-4" value="" style="shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="C-vyLk0tnHw3VtMMgP7b-2">
<mxCell id="pYs8RI9N3Ibb1gkCTSyZ-1" value="" style="shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="C-vyLk0tnHw3VtMMgP7b-2">
<mxGeometry y="180" width="250" height="30" as="geometry" />
</mxCell>
<mxCell id="x74P35Y3yzVWP2ge3KBl-5" value="" style="shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;" vertex="1" parent="x74P35Y3yzVWP2ge3KBl-4">
<mxCell id="pYs8RI9N3Ibb1gkCTSyZ-2" value="" style="shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;" vertex="1" parent="pYs8RI9N3Ibb1gkCTSyZ-1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="x74P35Y3yzVWP2ge3KBl-6" value="is_pinned boolean NOT NULL" style="shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;" vertex="1" parent="x74P35Y3yzVWP2ge3KBl-4">
<mxCell id="pYs8RI9N3Ibb1gkCTSyZ-3" value="options varchar(255)" style="shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;" vertex="1" parent="pYs8RI9N3Ibb1gkCTSyZ-1">
<mxGeometry x="30" width="220" height="30" as="geometry">
<mxRectangle width="220" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="IqcACfFecUyFIL0cjSVW-42" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1.001;entryY=0.366;entryDx=0;entryDy=0;entryPerimeter=0;endArrow=ERmany;endFill=0;startArrow=none;startFill=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="C-vyLk0tnHw3VtMMgP7b-6" target="IqcACfFecUyFIL0cjSVW-17" edge="1">
<mxCell id="IqcACfFecUyFIL0cjSVW-42" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1.001;entryY=0.366;entryDx=0;entryDy=0;entryPerimeter=0;endArrow=ERmany;endFill=0;startArrow=none;startFill=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="1" target="IqcACfFecUyFIL0cjSVW-17" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="684.53" y="298.69999999999993" as="targetPoint" />
<Array as="points">
@ -339,11 +339,9 @@
<mxPoint x="750" y="269" />
<mxPoint x="750" y="331" />
</Array>
<mxPoint x="675" y="135" as="sourcePoint" />
</mxGeometry>
</mxCell>
<mxCell id="IqcACfFecUyFIL0cjSVW-73" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.667;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" source="C-vyLk0tnHw3VtMMgP7b-3" target="IqcACfFecUyFIL0cjSVW-17" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="IqcACfFecUyFIL0cjSVW-74" value="admins" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=0;align=center;resizeLast=1;" parent="1" vertex="1">
<mxGeometry x="140" y="400" width="250" height="120" as="geometry" />
</mxCell>

View File

@ -7,10 +7,10 @@ CREATE TABLE boards (
CREATE TABLE threads (
thread_id SERIAL8 PRIMARY KEY,
thread_name VARCHAR(32),
root_post_id INT NOT NULL,
posts_ids INT[],
is_locked boolean NOT NULL,
is_pinned boolean NOT NULL
options VARCHAR(255)
);
CREATE TABLE media (