# `PhoenixKit.Install.Common`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.165/lib/phoenix_kit/install/common.ex#L1)

Common utilities shared between PhoenixKit installation and update tasks.

This module provides shared functionality for:
- Timestamp generation
- Version formatting
- Status checking
- Migration detection

# `check_installation_status`

Checks the current installation status for a given prefix.

Returns one of:
- `{:not_installed}` - PhoenixKit is not installed
- `{:current_version, version}` - PhoenixKit is installed with given version

## Parameters
- `prefix` - Database schema prefix (default: "public")

## Examples

    iex> PhoenixKit.Install.Common.check_installation_status("public")
    {:current_version, 3}

    iex> PhoenixKit.Install.Common.check_installation_status("auth")
    {:not_installed}

# `check_update_needed`

Checks if an update is needed from current to target version.

## Parameters
- `prefix` - Database schema prefix
- `force` - Force update even if already up to date

## Returns
- `{:up_to_date, current_version}` - Already up to date
- `{:update_needed, current_version, target_version}` - Update available
- `{:not_installed}` - PhoenixKit not installed

# `current_version`

Gets current PhoenixKit version from migrations system.

# `describe_version_changes`

Describes what changed between versions.

## Parameters
- `from_version` - Starting version number
- `to_version` - Target version number

## Returns
String describing the changes between versions.

# `find_existing_phoenix_kit_migrations`

Finds existing PhoenixKit migrations in the project.

Returns a list of migration file paths.

# `generate_timestamp`

Generates timestamp in Ecto migration format.

## Examples

    iex> PhoenixKit.Install.Common.generate_timestamp()
    "20250908123045"

# `migrated_version`

Gets migrated version for given prefix.

## Parameters
- `prefix` - Database schema prefix

# `pad`

Pads a number with leading zero if less than 10.

## Examples

    iex> PhoenixKit.Install.Common.pad(5)
    "05"

    iex> PhoenixKit.Install.Common.pad(12)
    "12"

# `pad_version`

Pads version number for consistent naming.

## Examples

    iex> PhoenixKit.Install.Common.pad_version(1)
    "01"

    iex> PhoenixKit.Install.Common.pad_version(15)
    "15"

# `phoenix_kit_migration?`

Checks if a filename matches PhoenixKit migration pattern.

## Examples

    iex> PhoenixKit.Install.Common.phoenix_kit_migration?("20250908_add_phoenix_kit_tables.exs")
    true

    iex> PhoenixKit.Install.Common.phoenix_kit_migration?("20250908_create_users.exs")
    false

---

*Consult [api-reference.md](api-reference.md) for complete listing*
