Skip to content

Store multiples databases with the same name #73

Answered by andinux
ingdesarr1 asked this question in Help
Discussion options

You must be logged in to vote

Hi @ingdesarr1 ,

Thanks for reaching out.

What you're describing is a perfect use case for OffSync in combination with Row-Level Security (RLS) and Access Tokens. These features are designed specifically to support secure, multi-device, and multi-tenant architectures—while maintaining clear data separation between clients.


✅ Recommended Approach

Instead of managing a separate database per device, we suggest using a single shared database with an additional column to track ownership. For example:

CREATE TABLE tasks (
  id TEXT PRIMARY KEY NOT NULL,
  user_id TEXT,
  title TEXT,
  status TEXT
);

With this setup:

  • OffSync enables automatic bidirectional syncing between the device and the cl…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@ingdesarr1
Comment options

@andinux
Comment options

Answer selected by andinux
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants