internal/storage/postgres/storage.go
func (s *Storage) Setup() error {
	query := fmt.Sprintf(`
		CREATE SCHEMA IF NOT EXISTS %s;
		CREATE TABLE IF NOT EXISTS %s.%s (
			access_token BYTEA PRIMARY KEY,
			refresh_token BYTEA,
			subject_id TEXT NOT NULL,
			subject_client TEXT,
			bag bytea NOT NULL,
			expire_at TIMESTAMPTZ NOT NULL DEFAULT (NOW() + '%d seconds')

		);
		CREATE INDEX ON %s.%s (refresh_token);
		CREATE INDEX ON %s.%s (subject_id);
		CREATE INDEX ON %s.%s (expire_at DESC);
	`, s.schema, s.schema, s.table, int64(s.ttl.Seconds()),
		s.schema, s.table,
		s.schema, s.table,
		s.schema, s.table,
	)
	_, err := s.db.Exec(query)

	return err
}
func (s *Storage) Setup() error {
	query := fmt.Sprintf(`
		CREATE SCHEMA IF NOT EXISTS %s;
		CREATE TABLE IF NOT EXISTS %s.%s (
			access_token BYTEA PRIMARY KEY,
			refresh_token BYTEA,
			subject_id TEXT NOT NULL,
			subject_client TEXT,
			bag bytea NOT NULL,
			expire_at TIMESTAMPTZ NOT NULL DEFAULT (NOW() + '%d seconds')

		);
		CREATE INDEX ON %s.%s (refresh_token);
		CREATE INDEX ON %s.%s (subject_id);
		CREATE INDEX ON %s.%s (expire_at DESC);
	`, s.schema, s.schema, s.table, int64(s.ttl.Seconds()),
		s.schema, s.table,
		s.schema, s.table,
		s.schema, s.table,
	)
	_, err := s.db.Exec(query)

	return err
}
// Setup implements storage interface.