changeCompositeTypeSchema

The changeCompositeTypeSchema change type moves a composite type from the schema where it currently exists to a new schema.

Note: Inspection features or commands, such as snapshot, diff, generate-changelog, and diff-changelog, are not currently supported with composite types.

Run changeCompositeTypeSchema

To run this Change Type, follow these steps:

  1. Add the Change Type to your changeset, as shown in the examples on this page.
  2. Specify any required attributes. Use the table on this page to see which ones your database requires.
  3. Deploy your changeset by running the update command:
  4. liquibase update

Available attributes

Name Type Description Requirement
catalogName String Name of the catalog Optional
typeName String Name of the composite type to be moved to the new schema Required
oldSchemaName String Name of the schema that contains the composite type you want to move Required
newSchemaName String Name of the schema you would like to move the type to Required

Examples


databaseChangeLog:
	- changeSet:
		id: "3"
		author: "itTest"
		changes:
		 - changeCompositeTypeSchema:
			typeName: "person_info"
			catalogName: "my_database"
			oldSchemaName: "public"
			newSchemaName: "shared"
		rollback: []	

{
 "databaseChangeLog":[
	{
	 "changeSet": {
		"id": "3",
		"author": "itTest",
		"changes": [
		  {
			 "changeCompositeTypeSchema": {
		 	 "typeName": "person_info",
		  	 "catalogName": "my_database",
		 	 "oldSchemaName": "public",
			 "newSchemaName": "shared"
		   }
	    }
	 ],
	 "rollback": []
	    }
     }
  ] 
} 		 	

<databaseChangeLog
	xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
	xmlns:pro="http://www.liquibase.org/xml/ns/pro"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
	 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
<changeSet author="itTest" id="3"> <pro:changeCompositeTypeSchema typeName="person_info" catalogName="my_database" oldSchemaName="public" newSchemaName="shared" /> <rollback/> </changeSet> </databaseChangeLog>

Database Support

This change type is only supported for PostgreSQL.