def METHOD_NAME(
    sq3c,
    pgc,
    old_table: str,
    new_table: str | None = None,
    placeholders: dict[str, str] | None = None,
    id_column: str | None = "id",
    extra_clause="",
    new_columns=None,
):
    log_info(f"Migrating table {old_table}...")
    if new_table is None:
        new_table = old_table
    if new_columns is None:
        new_columns = {}
    sq3c.execute(
        f"SELECT * {', {}'.format(','.join((k + ' as ' + v for k, v in new_columns.items()))) if new_columns else ''} FROM {old_table} {extra_clause}"
    )
    columns = list(map(lambda x: x[0], sq3c.description))
    if placeholders is None:
        placeholders = {}
    for c in columns:
        if c not in placeholders:
            placeholders[c] = "%s"
    column_str = f'({",".join(columns)})'
    placeholder_list = [placeholders[c] for c in columns]
    template_str = f'({",".join(placeholder_list)})'
    i = 0
    for row in sq3c:
        pgc.execute(f"INSERT INTO {new_table} {column_str} VALUES {template_str}", row)
        i += 1
    if id_column is not None:
        update_seq_val(pgc, new_table, id_column)
    log_info(f"Migrated table {old_table} ({i} rows)")