Prerequisites
psql
in this guide.Run the Docker Container
test
database
and the 00000000-0000-0000-0000-000000000000
user.Connecting to the Database
psql
with the following connection string:Create a tenant-aware table
tenant_id
column. All the rows in such tables belong to a specific tenant.Let us create our first table that has a tenant_id column and a vector column:psql
, you can view the table schema by running \d todos
.Create tenants
tenants
table. Lets create our first tenant by inserting a row into the tenants
table:Insert data into a tenant-aware table
Tenant isolation
NILE_TESTING_DB_NAME
: The name of the database. Defaults to test
.NILE_TESTING_DB_ID
: The ID of the database. Must be a UUID. Defaults to 01000000-0000-7000-8000-000000000000
.NILE_TESTING_DB_USER
: The username for the database user. Must be UUID. Defaults to 00000000-0000-0000-0000-000000000000
.NILE_TESTING_DB_PASSWORD
: The password of the database user. Defaults to password
.niledatabase/testingcontainer:latest
(since they may refer to older versions) and then running docker pull ghcr.io/niledatabase/testingcontainer:latest
.
Please check if any of the common issues and solutions below help solve your problem. If not, we welcome you to report the issue on either GitHub or Discord
When reporting the issue, please include:
docker logs <container_id>
)psql
will try to connect to the default Postgres instance, which fails because we are using a specific user that doesn’t exist in the default Postgres instance.
You can either: