# Pt-online-schema-change id ID

**URL:** <https://forums.percona.com/t/pt-online-schema-change-id-id/27121>\
**Category:** Percona Server for MySQL 5.7\
**Tags:** percona\
**Created:** [December 13, 2023, 2:12pm UTC](https://forums.percona.com/t/pt-online-schema-change-id-id/27121 "2023-12-13T14:12:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ArtemGob](https://avatars.discourse-cdn.com/v4/letter/a/c6cbf5/32.png) [@ArtemGob](https://forums.percona.com/u/ArtemGob)\
**Post date:** [December 13, 2023, 2:12pm UTC](https://forums.percona.com/t/pt-online-schema-change-id-id/27121/1 "2023-12-13T14:12:25Z")

</div>

Hello.  
I used the pt-online-schema-change tool and did not understand one logic.  
There is a test database mybases, there is a test table sbtest1, the table has an id column (special attention that it is in lower case) and a primary key in it.  
I make the following request:  
`pt-online-schema-change --alter "MODIFY COLUMN ID BIGINT AUTO_INCREMENT" D=mybases,t=sbtest1 --print --execute --critical-load Threads_running=10 --max-lag=200s.`  
When the command is applied, the column name changes from id to ID (upper case). Is this normal behavior?

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [December 13, 2023, 5:21pm UTC](https://forums.percona.com/t/pt-online-schema-change-id-id/27121/2 "2023-12-13T17:21:32Z")

</div>

Your command says to change id to ID. You need to modify your --alter to make the column “id” and not “ID”

Also, please understand that switching to bigint is rarely needed. You should be currently using `int unsigned` which allows for values over 4 billion. Are you near this cap for row count on this table?

---

<div class="post-metadata">

**Author:** ![Mauricio\_Cacho](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mauricio_cacho/32/5859_2.png) [@Mauricio\_Cacho](https://forums.percona.com/u/Mauricio_Cacho)\
**Post date:** [December 15, 2023, 12:54am UTC](https://forums.percona.com/t/pt-online-schema-change-id-id/27121/3 "2023-12-15T00:54:06Z")

</div>

Hi @ArtemGob .

As Matthew mentioned, it’s expected and it’s not related to how pt-osc works.

I replicated your scenario with direct ALTERs:

```auto
mysql> SHOW CREATE TABLE test.tbl\G
***************************1. row***************************
       Table: tbl
Create Table: CREATE TABLE `tbl` (
  `id` tinyint NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
1 row in set (0.05 sec)

```

```auto
mysql> ALTER TABLE test.tbl MODIFY COLUMN ID BIGINT AUTO_INCREMENT;
Query OK, 0 rows affected (0.36 sec)
Records: 0 Duplicates: 0 Warnings: 0

```

```auto
mysql> SHOW CREATE TABLE test.tbl\G
***************************1. row***************************
       Table: tbl
Create Table: CREATE TABLE `tbl` (
  `ID` bigint NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
1 row in set (0.00 sec)

```

As you can see, the results are the same when performing the command directly; I hope this helps you enlighten the expected behaviour.

Best,  
Mauricio.
