mirror of
https://github.com/plausible/analytics.git
synced 2024-12-03 15:03:06 +03:00
5acb5b7039
* WIP * Add ability to filter by anything * Add API keys * Add version to api endpoint * Fix API test route * Fix API tests * Allow 'date' parameter in '6mo' and '12mo' * Rename session -> visit in API filters * Filter expressions in the API * Implement filters in aggregate call * Add `compare` option to aggregate call * Add way to manage API keys through the UI * Authenticate with API key * Use API key in tests
15 lines
360 B
Elixir
15 lines
360 B
Elixir
defmodule Plausible.Repo.Migrations.CreateApiKeys do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
create table(:api_keys) do
|
|
add :user_id, references(:users, on_delete: :delete_all), null: false
|
|
add :name, :string, null: false
|
|
add :key_prefix, :string, null: false
|
|
add :key_hash, :string, null: false
|
|
|
|
timestamps()
|
|
end
|
|
end
|
|
end
|