Skip to content

Commit

Permalink
Merge pull request #89
Browse files Browse the repository at this point in the history
Drop records table
  • Loading branch information
uatuko committed Apr 23, 2024
2 parents 5d41255 + 9e86cde commit 238eebc
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 679 deletions.
18 changes: 0 additions & 18 deletions db/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,6 @@ create table if not exists principals (

create index "principals.idx-segment" on principals using hash (segment);

create table if not exists records (
space_id text not null,
principal_id text not null,
resource_type text not null,
resource_id text not null,
attrs jsonb,
_rev integer not null,

constraint "records.pkey" primary key (space_id, principal_id, resource_type, resource_id),
constraint "records.fkey-space_id+principal_id" foreign key (space_id, principal_id)
references principals(space_id, id)
on delete cascade,

constraint "records.check-resource_type" check (resource_type <> ''),
constraint "records.check-resource_id" check (resource_id <> ''),
constraint "records.check-attrs" check (jsonb_typeof(attrs) = 'object')
);

create table if not exists tuples (
space_id text not null, -- used for creating data silos to support multi-tenancy
strand text not null, -- a relation that connects two tuples together
Expand Down
3 changes: 0 additions & 3 deletions src/db/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ target_sources(db
PRIVATE
pg.cpp
principals.cpp
records.cpp
tuples.cpp
PUBLIC
FILE_SET headers TYPE HEADERS
FILES
config.h
pg.h
principals.h
records.h
tuples.h
PRIVATE
FILE_SET private_headers TYPE HEADERS
Expand Down Expand Up @@ -52,7 +50,6 @@ if (SENTIUM_BUILD_TESTING)
PRIVATE
pg_test.cpp
principals_test.cpp
records_test.cpp
tuples_test.cpp
)

Expand Down
203 changes: 0 additions & 203 deletions src/db/records.cpp

This file was deleted.

68 changes: 0 additions & 68 deletions src/db/records.h

This file was deleted.

0 comments on commit 238eebc

Please sign in to comment.