how to add a new column 2ffield to an existing composite primary key

Solutions on MaxInterview for how to add a new column 2ffield to an existing composite primary key by the best coders in the world

showing results for - "how to add a new column 2ffield to an existing composite primary key"
Beatrice
21 Sep 2020
1 <changeSet author="yours_truly" id="EXAMPLE-02-01-dropPK">
2    <dropPrimaryKey  tableName= "our_awesome_table" constraintName="CPK_OUR_AWESOME_TABLE"/>
3 </changeSet>
4 
5 <changeSet author="yours_truly" id="EXAMPLE-02-01-addNNcol"> 
6     <addColumn tableName="our_awesome_table">
7         <column name="CREATED_AT" type="datetime" valueDate="current_datetime" defaultValueDate="current_datetime">
8            <constraints nullable="false"/>
9       </column>
10    </addColumn>
11</changeSet>
12
13<changeSet author="yours_truly" id="EXAMPLE-02-02">
14    <addPrimaryKey tableName="our_awesome_table" columnNames="source,external_id,CREATED_AT" constraintName="CPK_OUR_AWESOME_TABLE"/>
15</changeSet>