Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop records table #89

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading
Loading