Skip to content
Snippets Groups Projects
user avatar
bryan authored
* add column for marking the audit database

* create audit db on app startup

On app startup, in enterprise mode, always check that there is an
up-to-date audit database with is_audit set to true. up-to-date means
that it matches the app-db. If the audit db doesnt exist, or doesn't match up with
the app-db, it will be created. otherwise no-op

- refactor GET /api/database/ into defendpoint

* add a few tests

* add more tests + return kw for no-op

* Merge branch 'master' into bcm-add-app-db-as-audit-db

* fix migrations file

* lint fix + remove def

* keep the old audit db around

- nil -> ::no-op

* small macro fix

* Merge branch 'master' into bcm-add-app-db-as-audit-db

* Merge branch 'master' into bcm-add-app-db-as-audit-db

* move ensure-db-exists! into its own namespace

- avoids circlar dependency on app startup

* fix tests

* lint fix

* inspect test values

* use mdb.env/env to initialize audit db

* try returning the app-db connection pool

- instead of making a doppelganger in metabase database

* get the is_audit column when looking up dbs in qp

- this key is needed to return the appdb for the "Audit DB"'s connection

* clean up audit-db install/update/noop logic

* remove audit db from GET api/database/

* Merge branch 'master' of github.com:metabase/metabase into bcm-add-app-db-as-audit-db

* fix linter + inline extra function

* fix a test

* Merge branch 'master' into bcm-add-app-db-as-audit-db

* don't test actions on audit db :cry:

* Revert "don't test actions on audit db :cry:"

This reverts commit 581ed1ab9495de7b46bccb8b1ab19f66a8fd106d.

* for tests to work low IDs are basically reserved

- use a higher id when installing audit db

* use defenterprise for ensure-audit-db-installed!

* Merge branch 'master' into bcm-add-app-db-as-audit-db
11c1bbaf
History

Metabase

Metabase is the easy, open-source way for everyone in your company to ask questions and learn from data.

Metabase Product Screenshot

Latest Release codecov Docker Pulls

Features

Take a tour of Metabase.

Supported databases

Installation

Metabase can be run just about anywhere. Check out our Installation Guides.

Contributing

To get started with a development installation of the Metabase, check out our Developers Guide.

Internationalization

We want Metabase to be available in as many languages as possible. See which translations are available and help contribute to internationalization using our project over at POEditor. You can also check out our policies on translations.

Extending Metabase

Hit our Query API from Javascript to integrate analytics. Metabase enables your application to:

  • Build moderation interfaces.
  • Export subsets of your users to third party marketing automation software.
  • Provide a custom customer lookup application for the people in your company.

Check out our guide, Working with the Metabase API.

Security Disclosure

See SECURITY.md for details.

License

This repository contains the source code for both the Open Source edition of Metabase, released under the AGPL, as well as the commercial editions of Metabase, which are released under the Metabase Commercial Software License.

See LICENSE.txt for details.

Unless otherwise noted, all files © 2023 Metabase, Inc.

Metabase Experts

If you’d like more technical resources to set up your data stack with Metabase, connect with a Metabase Expert.