1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-02 10:56:25 -07:00

Update init SQL files and schema diagram now that the wordfilter table is no longer necessary

This commit is contained in:
Eggbertx 2024-08-12 12:31:12 -07:00
parent 4802c837fb
commit 83bc642674
7 changed files with 60 additions and 254 deletions

View file

@ -152,6 +152,15 @@ func (fc *FilterCondition) insert(ctx context.Context, tx *sql.Tx) error {
return err
}
// FilterHit represents a match from a post filter to an attempted post
// table: DBPREFIXfilter_hits
type FilterHit struct {
ID int // sql: id
FilterID int // sql: filter_id
PostData string // sql: post_data
MatchTime time.Time // sql: match_time
}
// Upload represents a file attached to a post.
// table: DBPREFIXfiles
type Upload struct {

View file

@ -1,6 +1,6 @@
<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0" version="24.7.6">
<diagram id="TVQ4taKJlGjEfO4J5nL0" name="Page-1">
<mxGraphModel dx="1669" dy="1562" 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">
<mxGraphModel dx="2045" dy="1773" 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">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
@ -981,8 +981,7 @@
<mxCell id="HCdwY-z6x6o0OOCE2pfi-27" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="1" source="3aW1d9BRP5cUNr9OOUW6-10" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-61" y="10" />
<mxPoint x="-10" y="10" />
<mxPoint x="-10" y="-45" />
<mxPoint x="-10" y="525" />
<mxPoint x="40" y="525" />
<mxPoint x="40" y="121" />
@ -1016,7 +1015,7 @@
<mxGeometry width="30" height="26" as="geometry" />
</mxCell>
<mxCell id="3aW1d9BRP5cUNr9OOUW6-3" value="filters" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;" parent="1" vertex="1">
<mxGeometry x="-222" y="-64" width="161" height="240" as="geometry" />
<mxGeometry x="-219" y="-120" width="161" height="240" as="geometry" />
</mxCell>
<mxCell id="3aW1d9BRP5cUNr9OOUW6-4" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;" parent="3aW1d9BRP5cUNr9OOUW6-3" vertex="1">
<mxGeometry y="30" width="161" height="30" as="geometry" />
@ -1096,21 +1095,21 @@
<mxRectangle width="131" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="F6w5-eZRLOtoem_8IVZW-4" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="3aW1d9BRP5cUNr9OOUW6-3">
<mxCell id="F6w5-eZRLOtoem_8IVZW-4" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" parent="3aW1d9BRP5cUNr9OOUW6-3" vertex="1">
<mxGeometry y="210" width="161" height="30" as="geometry" />
</mxCell>
<mxCell id="F6w5-eZRLOtoem_8IVZW-5" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="F6w5-eZRLOtoem_8IVZW-4">
<mxCell id="F6w5-eZRLOtoem_8IVZW-5" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" parent="F6w5-eZRLOtoem_8IVZW-4" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="F6w5-eZRLOtoem_8IVZW-6" value="is_active" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="F6w5-eZRLOtoem_8IVZW-4">
<mxCell id="F6w5-eZRLOtoem_8IVZW-6" value="is_active" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" parent="F6w5-eZRLOtoem_8IVZW-4" vertex="1">
<mxGeometry x="30" width="131" height="30" as="geometry">
<mxRectangle width="131" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="3aW1d9BRP5cUNr9OOUW6-26" value="filter_conditions" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;" parent="1" vertex="1">
<mxGeometry x="-222" y="340" width="161" height="180" as="geometry" />
<mxGeometry x="-221" y="280" width="161" height="180" as="geometry" />
</mxCell>
<mxCell id="3aW1d9BRP5cUNr9OOUW6-27" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;" parent="3aW1d9BRP5cUNr9OOUW6-26" vertex="1">
<mxGeometry y="30" width="161" height="30" as="geometry" />
@ -1181,13 +1180,13 @@
<mxGeometry relative="1" as="geometry">
<mxPoint x="-190" y="460" as="targetPoint" />
<Array as="points">
<mxPoint x="-30" y="415" />
<mxPoint x="-30" y="-19" />
<mxPoint x="-30" y="355" />
<mxPoint x="-30" y="-75" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="3aW1d9BRP5cUNr9OOUW6-44" value="filter_hits" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;" parent="1" vertex="1">
<mxGeometry x="-221" y="530" width="161" height="120" as="geometry" />
<mxGeometry x="-221" y="483" width="161" height="150" as="geometry" />
</mxCell>
<mxCell id="3aW1d9BRP5cUNr9OOUW6-45" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;" parent="3aW1d9BRP5cUNr9OOUW6-44" vertex="1">
<mxGeometry y="30" width="161" height="30" as="geometry" />
@ -1210,7 +1209,7 @@
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="3aW1d9BRP5cUNr9OOUW6-50" value="condition_id" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" parent="3aW1d9BRP5cUNr9OOUW6-48" vertex="1">
<mxCell id="3aW1d9BRP5cUNr9OOUW6-50" value="filter_id" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" parent="3aW1d9BRP5cUNr9OOUW6-48" vertex="1">
<mxGeometry x="30" width="131" height="30" as="geometry">
<mxRectangle width="131" height="30" as="alternateBounds" />
</mxGeometry>
@ -1228,11 +1227,21 @@
<mxRectangle width="131" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="3aW1d9BRP5cUNr9OOUW6-59" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="3aW1d9BRP5cUNr9OOUW6-48" target="3aW1d9BRP5cUNr9OOUW6-27" edge="1">
<mxGeometry relative="1" as="geometry" />
<mxCell id="yg5FLuoNCa9ozOlX9ZaA-1" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="3aW1d9BRP5cUNr9OOUW6-44">
<mxGeometry y="120" width="161" height="30" as="geometry" />
</mxCell>
<mxCell id="yg5FLuoNCa9ozOlX9ZaA-2" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="yg5FLuoNCa9ozOlX9ZaA-1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="yg5FLuoNCa9ozOlX9ZaA-3" value="match_time" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="yg5FLuoNCa9ozOlX9ZaA-1">
<mxGeometry x="30" width="131" height="30" as="geometry">
<mxRectangle width="131" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-1" value="filter_boards" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;" parent="1" vertex="1">
<mxGeometry x="-219" y="196" width="159" height="120" as="geometry" />
<mxGeometry x="-217" y="140" width="159" height="120" as="geometry" />
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-2" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;" parent="pVkhM387UuaAuczoGdVe-1" vertex="1">
<mxGeometry y="30" width="159" height="30" as="geometry" />
@ -1276,170 +1285,26 @@
<mxCell id="pVkhM387UuaAuczoGdVe-14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="1" source="pVkhM387UuaAuczoGdVe-5" target="3aW1d9BRP5cUNr9OOUW6-4" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-30" y="271" />
<mxPoint x="-30" y="-19" />
<mxPoint x="-30" y="215" />
<mxPoint x="-30" y="-75" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-15" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="1" source="pVkhM387UuaAuczoGdVe-8" target="PdcwpANUKP4F5l-W0EyN-41" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-40" y="245" />
<mxPoint x="-40" y="300" />
<mxPoint x="440" y="300" />
<mxPoint x="440" y="121" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-16" value="wordfilters" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;" parent="1" vertex="1">
<mxGeometry x="-440" y="-40" width="180" height="240" as="geometry" />
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-17" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;" parent="pVkhM387UuaAuczoGdVe-16" vertex="1">
<mxGeometry y="30" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-18" value="PK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;fontStyle=1;overflow=hidden;whiteSpace=wrap;html=1;" parent="pVkhM387UuaAuczoGdVe-17" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-19" value="id" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;fontStyle=5;overflow=hidden;whiteSpace=wrap;html=1;" parent="pVkhM387UuaAuczoGdVe-17" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-20" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" parent="pVkhM387UuaAuczoGdVe-16" vertex="1">
<mxGeometry y="60" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-21" value="FK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" parent="pVkhM387UuaAuczoGdVe-20" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-22" value="staff_id" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" parent="pVkhM387UuaAuczoGdVe-20" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-23" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" parent="pVkhM387UuaAuczoGdVe-16" vertex="1">
<mxGeometry y="90" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-24" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" parent="pVkhM387UuaAuczoGdVe-23" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-25" value="staff_note" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" parent="pVkhM387UuaAuczoGdVe-23" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-26" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" parent="pVkhM387UuaAuczoGdVe-16" vertex="1">
<mxGeometry y="120" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-27" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" parent="pVkhM387UuaAuczoGdVe-26" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-28" value="issued_at" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" parent="pVkhM387UuaAuczoGdVe-26" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-29" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" parent="pVkhM387UuaAuczoGdVe-16" vertex="1">
<mxGeometry y="150" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-30" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" parent="pVkhM387UuaAuczoGdVe-29" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-31" value="search" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" parent="pVkhM387UuaAuczoGdVe-29" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-32" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" parent="pVkhM387UuaAuczoGdVe-16" vertex="1">
<mxGeometry y="180" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-33" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" parent="pVkhM387UuaAuczoGdVe-32" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-34" value="is_regex" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" parent="pVkhM387UuaAuczoGdVe-32" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-35" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" parent="pVkhM387UuaAuczoGdVe-16" vertex="1">
<mxGeometry y="210" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-36" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" parent="pVkhM387UuaAuczoGdVe-35" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-37" value="change_to" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" parent="pVkhM387UuaAuczoGdVe-35" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-38" value="wordfilter_boards" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;" parent="1" vertex="1">
<mxGeometry x="-440" y="220" width="180" height="120" as="geometry" />
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-39" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;" parent="pVkhM387UuaAuczoGdVe-38" vertex="1">
<mxGeometry y="30" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-40" value="PK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;fontStyle=1;overflow=hidden;whiteSpace=wrap;html=1;" parent="pVkhM387UuaAuczoGdVe-39" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-41" value="id" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;fontStyle=5;overflow=hidden;whiteSpace=wrap;html=1;" parent="pVkhM387UuaAuczoGdVe-39" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-42" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" parent="pVkhM387UuaAuczoGdVe-38" vertex="1">
<mxGeometry y="60" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-43" value="FK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" parent="pVkhM387UuaAuczoGdVe-42" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-44" value="wordfilter_id" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" parent="pVkhM387UuaAuczoGdVe-42" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-45" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" parent="pVkhM387UuaAuczoGdVe-38" vertex="1">
<mxGeometry y="90" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-46" value="FK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" parent="pVkhM387UuaAuczoGdVe-45" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-47" value="board_id" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" parent="pVkhM387UuaAuczoGdVe-45" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-51" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="pVkhM387UuaAuczoGdVe-42" target="pVkhM387UuaAuczoGdVe-17" edge="1">
<mxCell id="yg5FLuoNCa9ozOlX9ZaA-4" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;fillColor=#ffe6cc;strokeColor=#d79b00;" edge="1" parent="1" source="3aW1d9BRP5cUNr9OOUW6-48" target="3aW1d9BRP5cUNr9OOUW6-4">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-470" y="295" />
<mxPoint x="-470" y="5" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="pVkhM387UuaAuczoGdVe-52" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="1" source="pVkhM387UuaAuczoGdVe-45" target="PdcwpANUKP4F5l-W0EyN-41" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint y="330" />
<mxPoint y="300" />
<mxPoint x="440" y="300" />
<mxPoint x="440" y="121" />
<mxPoint x="-30" y="558" />
<mxPoint x="-30" y="-75" />
</Array>
</mxGeometry>
</mxCell>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 634 KiB

After

Width:  |  Height:  |  Size: 586 KiB

Before After
Before After

View file

@ -299,10 +299,11 @@ CREATE TABLE DBPREFIXfilter_conditions(
CREATE TABLE DBPREFIXfilter_hits(
id {serial pk},
condition_id {fk to serial} NOT NULL,
post_data TEXT,
CONSTRAINT filter_hits_condition_id_fk
FOREIGN KEY(condition_id) REFERENCES DBPREFIXfilter_conditions(id)
filter_id {fk to serial} NOT NULL,
post_data TEXT NOT NULL,
match_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT filter_hits_filter_id_fk
FOREIGN KEY(filter_id) REFERENCES DBPREFIXfilters(id)
ON DELETE CASCADE
);

View file

@ -294,42 +294,19 @@ CREATE TABLE DBPREFIXfilter_conditions(
CONSTRAINT filter_conditions_filter_id_fk
FOREIGN KEY(filter_id) REFERENCES DBPREFIXfilters(id)
ON DELETE CASCADE,
CONSTRAINT wordfilter_conditions_search_check CHECK (search <> '')
CONSTRAINT filter_conditions_search_check CHECK (search <> '')
);
CREATE TABLE DBPREFIXfilter_hits(
id BIGINT NOT NULL AUTO_INCREMENT UNIQUE PRIMARY KEY,
condition_id BIGINT NOT NULL,
post_data TEXT,
CONSTRAINT filter_hits_condition_id_fk
FOREIGN KEY(condition_id) REFERENCES DBPREFIXfilter_conditions(id)
ON DELETE CASCADE
);
CREATE TABLE DBPREFIXwordfilters(
id BIGINT NOT NULL AUTO_INCREMENT UNIQUE PRIMARY KEY,
staff_id BIGINT NOT NULL,
staff_note VARCHAR(255) NOT NULL,
issued_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
search VARCHAR(75) NOT NULL,
is_regex BOOL NOT NULL,
change_to VARCHAR(75) NOT NULL,
CONSTRAINT wordfilters_staff_id_fk
FOREIGN KEY(staff_id) REFERENCES DBPREFIXstaff(id),
CONSTRAINT wordfilters_search_check CHECK (search <> '')
);
CREATE TABLE DBPREFIXwordfilter_boards(
id BIGINT NOT NULL AUTO_INCREMENT UNIQUE PRIMARY KEY,
filter_id BIGINT NOT NULL,
board_id BIGINT NOT NULL,
CONSTRAINT wordfilter_boards_filter_id_fk
post_data TEXT,
match_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT filter_hits_filter_id_fk
FOREIGN KEY(filter_id) REFERENCES DBPREFIXfilters(id)
ON DELETE CASCADE,
CONSTRAINT wordfilter_boards_board_id_fk
FOREIGN KEY(board_id) REFERENCES DBPREFIXboards(id)
ON DELETE CASCADE
);
INSERT INTO DBPREFIXdatabase_version(component, version)
VALUES('gochan', 3);

View file

@ -294,42 +294,19 @@ CREATE TABLE DBPREFIXfilter_conditions(
CONSTRAINT filter_conditions_filter_id_fk
FOREIGN KEY(filter_id) REFERENCES DBPREFIXfilters(id)
ON DELETE CASCADE,
CONSTRAINT wordfilter_conditions_search_check CHECK (search <> '')
CONSTRAINT filter_conditions_search_check CHECK (search <> '')
);
CREATE TABLE DBPREFIXfilter_hits(
id BIGSERIAL PRIMARY KEY,
condition_id BIGINT NOT NULL,
post_data TEXT,
CONSTRAINT filter_hits_condition_id_fk
FOREIGN KEY(condition_id) REFERENCES DBPREFIXfilter_conditions(id)
ON DELETE CASCADE
);
CREATE TABLE DBPREFIXwordfilters(
id BIGSERIAL PRIMARY KEY,
staff_id BIGINT NOT NULL,
staff_note VARCHAR(255) NOT NULL,
issued_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
search VARCHAR(75) NOT NULL,
is_regex BOOL NOT NULL,
change_to VARCHAR(75) NOT NULL,
CONSTRAINT wordfilters_staff_id_fk
FOREIGN KEY(staff_id) REFERENCES DBPREFIXstaff(id),
CONSTRAINT wordfilters_search_check CHECK (search <> '')
);
CREATE TABLE DBPREFIXwordfilter_boards(
id BIGSERIAL PRIMARY KEY,
filter_id BIGINT NOT NULL,
board_id BIGINT NOT NULL,
CONSTRAINT wordfilter_boards_filter_id_fk
post_data TEXT,
match_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT filter_hits_filter_id_fk
FOREIGN KEY(filter_id) REFERENCES DBPREFIXfilters(id)
ON DELETE CASCADE,
CONSTRAINT wordfilter_boards_board_id_fk
FOREIGN KEY(board_id) REFERENCES DBPREFIXboards(id)
ON DELETE CASCADE
);
INSERT INTO DBPREFIXdatabase_version(component, version)
VALUES('gochan', 3);

View file

@ -294,42 +294,19 @@ CREATE TABLE DBPREFIXfilter_conditions(
CONSTRAINT filter_conditions_filter_id_fk
FOREIGN KEY(filter_id) REFERENCES DBPREFIXfilters(id)
ON DELETE CASCADE,
CONSTRAINT wordfilter_conditions_search_check CHECK (search <> '')
CONSTRAINT filter_conditions_search_check CHECK (search <> '')
);
CREATE TABLE DBPREFIXfilter_hits(
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
condition_id BIGINT NOT NULL,
post_data TEXT,
CONSTRAINT filter_hits_condition_id_fk
FOREIGN KEY(condition_id) REFERENCES DBPREFIXfilter_conditions(id)
ON DELETE CASCADE
);
CREATE TABLE DBPREFIXwordfilters(
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
staff_id BIGINT NOT NULL,
staff_note VARCHAR(255) NOT NULL,
issued_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
search VARCHAR(75) NOT NULL,
is_regex BOOL NOT NULL,
change_to VARCHAR(75) NOT NULL,
CONSTRAINT wordfilters_staff_id_fk
FOREIGN KEY(staff_id) REFERENCES DBPREFIXstaff(id),
CONSTRAINT wordfilters_search_check CHECK (search <> '')
);
CREATE TABLE DBPREFIXwordfilter_boards(
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
filter_id BIGINT NOT NULL,
board_id BIGINT NOT NULL,
CONSTRAINT wordfilter_boards_filter_id_fk
post_data TEXT,
match_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT filter_hits_filter_id_fk
FOREIGN KEY(filter_id) REFERENCES DBPREFIXfilters(id)
ON DELETE CASCADE,
CONSTRAINT wordfilter_boards_board_id_fk
FOREIGN KEY(board_id) REFERENCES DBPREFIXboards(id)
ON DELETE CASCADE
);
INSERT INTO DBPREFIXdatabase_version(component, version)
VALUES('gochan', 3);