Authority
  • Introduction
  • In Action
  • Performance at Scale
  • Roadmap / Features
  • Getting Started
    • Introduction
    • Installation
    • Configuration Overview
  • Authentication
    • Authentication Guide
    • API Documentation
    • Customizing Authentication
  • Security & Error Handling
    • Security Considerations
    • Error Handling & Troubleshooting
  • Providers
    • Client Providers
    • Owner Providers
  • API Endpoints
    • API Endpoints
  • DEVELOPMENT
    • Requirements
    • Database
    • User Interface
    • Specs
    • Deployment
      • Environment Variables
  • Reference
    • OAuth Terms
    • OAuth 2 Grant Flows
      • Device Flow
      • Authorization Flow
      • Client Credentials Flow
      • Refreshing Access Tokens
      • Access Token Response
      • Json Web Tokens
      • Legacy: Implicit grant
      • Legacy: Password
    • Open ID Connect
      • Configuration
      • Registering Clients
      • User Info
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. DEVELOPMENT

Database

You can customize the database table and fields of your Authority server by simply modifying the migration files found under db/migrations.

A bad database configuration might stop your database from working. Take extra care to make sure the configuration is correct.

Clients Migration File

class CreateClients
  include Clear::Migration

  def change(direction)
    direction.up do
      create_table :clients, id: :uuid do |t|
        t.column :client_id, "uuid", index: true, unique: true, default: "uuid_generate_v4()"
        t.column :name, "varchar(120)", null: false, index: true, unique: true
        t.column :description, "varchar(2000)"
        t.column :logo, "varchar(120)", null: false
        t.column :client_secret, "varchar(80)", null: false
        t.column :redirect_uri, "varchar(2000)", null: false
        t.column :scopes, "varchar(4000)", null: false

        t.timestamps
      end
    end

    direction.down do
      execute "DROP TABLE IF EXISTS ;"
    end
  end
end

PreviousRequirementsNextUser Interface

Last updated 7 months ago

Was this helpful?