I have created a table with name person and added a column 'phone_number' using liquibase changeset. But now I want to add a default value for it. but it did not work, so far I have tried this:
<addDefaultValue columnName="phone_number"
defaultValue="+923331234567"
tableName="person"/>
and
<changeSet author="haseeb" id="20160413123500">
<update tableName="person">
<column name="phone_number" type="varchar(255)" defaultValue="+923331234567"/>
</update>
</changeSet>
and
<changeSet author="haseeb" id="20160413123501">
<update tableName="person">
<column name="phone_number" type="varchar(255)" value="+923331234567"/>
</update>
Can anyone point out where I did wrong and also would adding default value will add value to previously added rows?