mirror of
https://github.com/trailbaseio/trailbase.git
synced 2025-12-21 09:29:44 -06:00
It's still early days, e.g. the UI doesn't yet support creating new DBs. However it allows exploring, creating and altering schemas for existing DBs. For now use the config to register new DBs. Changes: * Config-driven life-cycle management for "extra" DBs, i.e. creation and migration-management. * Completely rewire connection & schema access throughout, now using a ConnectionManager abstraction. * Update SubscriptionManager to track subscriptions across multiple DBs. * Per-DB file management. * Improved error handling. * Basic e2e tests including file handling. * Update UI: * Explorer: show, create and alteration of schemas on non-main DBs. * SQL Editor: allow control over which DBs are attached to the connection. This change is breaking: it affects how migrations are loaded from `<traildepot>/migrations/<db>/` and switches transaction default of batch endpoint to false (cheaper). This change does not introduce a notion of multi-tenancy, i.e. create a per-tenant/user DB on the fly based on templates and corresponding traffic routing.
77 lines
2.0 KiB
Plaintext
77 lines
2.0 KiB
Plaintext
# Auto-generated config.Config textproto
|
|
email {}
|
|
server {
|
|
application_name: "TrailBase"
|
|
logs_retention_sec: 604800
|
|
enable_record_transactions: true
|
|
}
|
|
auth {
|
|
oauth_providers: [{
|
|
key: "oidc0"
|
|
value {
|
|
client_id: "invalid_client_id"
|
|
client_secret: "<REDACTED>"
|
|
provider_id: OIDC0
|
|
display_name: "My OIDC"
|
|
auth_url: "http://localhost:9088/authorize"
|
|
token_url: "http://localhost:9088/token"
|
|
user_api_url: "http://localhost:9088/userinfo"
|
|
}
|
|
}, {
|
|
key: "discord"
|
|
value {
|
|
client_id: "invalid_discord_id"
|
|
client_secret: "<REDACTED>"
|
|
provider_id: DISCORD
|
|
}
|
|
}]
|
|
}
|
|
jobs {}
|
|
databases: [{
|
|
name: "other"
|
|
}]
|
|
record_apis: [{
|
|
name: "simple_strict_table"
|
|
table_name: "simple_strict_table"
|
|
acl_authenticated: [CREATE, READ, UPDATE, DELETE]
|
|
enable_subscriptions: true
|
|
}, {
|
|
name: "simple_complete_view"
|
|
table_name: "simple_complete_view"
|
|
acl_authenticated: [CREATE, READ, UPDATE, DELETE]
|
|
}, {
|
|
name: "simple_subset_view"
|
|
table_name: "simple_subset_view"
|
|
acl_authenticated: [CREATE, READ, UPDATE, DELETE]
|
|
}, {
|
|
name: "movies"
|
|
table_name: "movies"
|
|
acl_world: [READ]
|
|
acl_authenticated: [CREATE, READ, UPDATE, DELETE]
|
|
}, {
|
|
name: "comment"
|
|
table_name: "comment"
|
|
acl_world: [READ]
|
|
expand: ["author", "post"]
|
|
}, {
|
|
name: "file_upload_table"
|
|
table_name: "file_upload_table"
|
|
acl_world: [CREATE, READ, DELETE]
|
|
acl_authenticated: [CREATE, READ, UPDATE, DELETE]
|
|
}, {
|
|
name: "other_file_upload_table"
|
|
table_name: "other.file_upload_table"
|
|
attached_databases: ["other"]
|
|
acl_world: [CREATE, READ, DELETE]
|
|
acl_authenticated: [CREATE, READ, UPDATE, DELETE]
|
|
}, {
|
|
name: "simple_schema_table"
|
|
table_name: "simple_schema_table"
|
|
acl_authenticated: [CREATE, READ, UPDATE, DELETE]
|
|
create_access_rule: "EXISTS(SELECT 1 FROM _user WHERE email = \'admin@localhost\' AND id = _USER_.id)"
|
|
}]
|
|
schemas: [{
|
|
name: "simple_schema"
|
|
schema: "{ \"type\": \"object\", \"properties\": { \"name\": { \"type\": \"string\" }, \"obj\": { \"type\": \"object\" } }, \"required\": [\"name\"]}"
|
|
}]
|