%3CLINGO-SUB%20id%3D%22lingo-sub-1330728%22%20slang%3D%22en-US%22%3EIntroducing%20Postgres%20Projects%20in%20Azure%20Data%20Studio%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1330728%22%20slang%3D%22en-US%22%3E%3CP%3EHow%20do%20you%20design%20and%20deploy%20your%20Postgres%20code%3F%20Some%20of%20you%20probably%20define%20the%20data%20model%20directly%20in%20your%20application%20code.%20Deploying%20a%20new%20build%20of%20your%20app%20then%20creates%20and%20updates%20the%20objects%20in%20your%20Postgres%20database.%20This%20approach%20can%20be%20pretty%20quick%20and%20convenient%2C%20especially%20when%20you%E2%80%99re%20testing.%20But%20it%20has%20its%20drawbacks%20in%20production%2C%20one%20of%20which%20is%20making%20coordination%20with%20your%20DBA%20and%20other%20app%20teams%20more%20difficult.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAlternatively%2C%20you%20could%20create%20database-specific%20deployment%20scripts%20that%20are%20separate%20from%20your%20application%20code.%20This%20approach%20provides%20more%20flexibility%20and%20control%20over%20what%20happens%20to%20your%20Postgres%20database%20and%20when.%20For%20example%2C%20separating%20app%20and%20database%20code%20can%20help%20make%20your%20version%20upgrades%20cleaner.%20You%20can%20even%20have%20instances%20of%20your%20app%20run%20against%20different%20database%20versions%20as%20needed.%20If%20you%20like%20this%20approach%20to%20organizing%20code%2C%20Azure%20Data%20Studio%20wants%20to%20give%20you%20a%20helping%20hand.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1356341388%22%20id%3D%22toc-hId--1356341388%22%3EDid%20you%20know%20there%20is%20a%20Postgres%20extension%20for%20Azure%20Data%20Studio%3F%3C%2FH2%3E%0A%3CP%3E%3CBR%20%2F%3ELast%20year%20we%20rolled%20out%20the%20Postgres%20extension%20to%20Azure%20Data%20Studio.%20The%20integration%20of%20Postgres%20with%20Azure%20Data%20Studio%20is%20super%20useful%20if%20Postgres%20is%20your%20jam%20and%20if%20you%20prefer%20a%20graphical%20editor%20over%20command%20line%20options%20like%20psql.%20(Psql%20as%20you%20probably%20know%20is%20the%20most%20popular%20interactive%20terminal%20for%20Postgres%3B%20in%20fact%2C%20some%20users%20refer%20to%20psql%20in%20Postgres%20as%20their%20best%20friend).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMore%20and%20more%20of%20our%20Postgres%20developers%20(well%2C%20the%20ones%20who%20aren%E2%80%99t%20in%20the%20cli-only%20camp)%20now%20use%20Azure%20Data%20Studio%20in%20their%20day%20to%20day%20work%20and%20in%20their%20demos.%20And%20just%20last%20month%2C%20we%20also%20rolled%20out%20an%20%3CA%20href%3D%22https%3A%2F%2Fcloudblogs.microsoft.com%2Fsqlserver%2F2020%2F03%2F23%2Fthe-march-2020-release-of-azure-data-studio-is-now-available%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eupdate%20to%20the%20Postgres%20extension%20in%20Azure%20Data%20Studio%3C%2FA%3E%20that%20allows%20seamless%20sign%20in%20using%20Active%20Directory%20for%20those%20of%20you%20with%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fservices%2Fpostgresql%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Database%20for%20PostgreSQL%20-%20Single%20Server%3C%2FA%3E%20databases.%20Sweet.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1131171445%22%20id%3D%22toc-hId-1131171445%22%3EBig%20welcome%20to%20Postgres%20Projects%20in%20Azure%20Data%20Studio%3C%2FH2%3E%0A%3CP%3E%3CBR%20%2F%3EBut%20back%20to%20today%E2%80%99s%20topic.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%E2%80%99re%20interested%20in%20the%20second%20approach%20I%20describe%20above%2C%20where%20you%20keep%20your%20application%20and%20database%20deployment%20scripts%20separate%E2%80%94what%20I%E2%80%99m%20calling%20database%20code%20isolation%E2%80%94we%E2%80%99re%20introducing%20a%20feature%20today%20to%20help%20make%20your%20life%20just%20a%20little%20easier%3A%20Introducing%20Projects%20for%20PostgreSQL%20in%20Azure%20Data%20Studio.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%E2%80%99re%20probably%20already%20familiar%20with%20the%20idea%20of%20creating%20a%20%E2%80%98project%E2%80%99%20or%20%E2%80%98solution%E2%80%99%20to%20organize%20your%20app%20code.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWell%20this%20is%20like%20that%20but%20for%20your%20Postgres%20database.%20In%20the%20context%20of%20Azure%20Data%20Studio%2C%20a%20project%20is%20a%20collection%20of%20SQL%20script%20files%2C%20which%20can%20be%20compiled%20into%20one%20single%20deployment%20script%20you%20can%20apply%20to%20your%20Postgres%20database.%20Save%20your%20project%20to%20a%20shared%20Git%20repository%20and%20use%20Azure%20Data%20Studio%E2%80%99s%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fsql%2Fazure-data-studio%2Fsource-control%3Fview%3Dsql-server-ver15%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Esource%20control%3C%2FA%3E%20features%20to%20collaborate%20across%20your%20team.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--676283018%22%20id%3D%22toc-hId--676283018%22%3EGetting%20started%20tour%20with%20Postgres%20Projects%20in%20Azure%20Data%20Studio%3C%2FH2%3E%0A%3CP%3E%3CBR%20%2F%3ETo%20get%20started%20with%20Postgres%20Projects%2C%20you%20need%20to%20install%20the%20latest%20versions%20of%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%20style%3D%22font-weight%3A%20400%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fsql%2Fazure-data-studio%2Fdownload-azure-data-studio%3Fview%3Dsql-server-ver15%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Data%20Studio.%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%20style%3D%22font-weight%3A%20400%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fsql%2Fazure-data-studio%2Fpostgres-extension%3Fview%3Dsql-server-ver15%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EThe%20PostgreSQL%20extension%20for%20Azure%20Data%20Studio%3C%2FA%3E%26nbsp%3B%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EOnce%20you%20have%20installed%20Azure%20Data%20Studio%20along%20with%20the%20Postgres%20extension%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EStart%20Azure%20Data%20Studio.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22azuredatastudio-icon-border.png%22%20style%3D%22width%3A%20200px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F187715i453493A11765FC59%2Fimage-size%2Fsmall%3Fv%3D1.0%26amp%3Bpx%3D200%22%20title%3D%22azuredatastudio-icon-border.png%22%20alt%3D%22azuredatastudio-icon-border.png%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%0A%3CLI%3ESelect%20the%20%3CSTRONG%3EFile%3C%2FSTRONG%3E%20menu%2C%20then%20select%20%3CSTRONG%3EOpen%20Folder%3C%2FSTRONG%3E.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Open%20Folder%20-%20in%20Azure%20Data%20Studio%20Postgres.png%22%20style%3D%22width%3A%20750px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F187626iED68368CBA95D1A1%2Fimage-dimensions%2F750x750%3Fv%3D1.0%22%20width%3D%22750%22%20height%3D%22750%22%20title%3D%22Open%20Folder%20-%20in%20Azure%20Data%20Studio%20Postgres.png%22%20alt%3D%22Open%20Folder%20-%20in%20Azure%20Data%20Studio%20Postgres.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3COL%20start%3D%223%22%3E%0A%3CLI%3ENavigate%20to%20the%20folder%20in%20which%20you%20want%20to%20create%20your%20project%20file%2C%20right-click%20the%20folder%20area%2C%20and%20then%20select%20%3CSTRONG%3ENew%20PostgreSQL%20Project%3C%2FSTRONG%3E.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Select%20New%20PostgreSQL%20Project%20-%20in%20Azure%20Data%20Studio%20Postgres.png%22%20style%3D%22width%3A%20750px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F187418i21B1795FBA6788FD%2Fimage-dimensions%2F750x750%3Fv%3D1.0%22%20width%3D%22750%22%20height%3D%22750%22%20title%3D%22Select%20New%20PostgreSQL%20Project%20-%20in%20Azure%20Data%20Studio%20Postgres.png%22%20alt%3D%22Select%20New%20PostgreSQL%20Project%20-%20in%20Azure%20Data%20Studio%20Postgres.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3COL%20start%3D%224%22%3E%0A%3CLI%3EIn%20the%20%3CSTRONG%3EProject%20Name%3C%2FSTRONG%3E%20text%20box%2C%20specify%20a%20name%20for%20the%20project%2C%20and%20then%20press%20Enter%20to%20create.%20This%20creates%20your%20project.%20The%20project%20folder%20will%20now%20have%20a%20file%20with%20file%20type%20.pgproj%2C%20which%20represents%20the%20Postgres%20project.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Name%20PostgreSQL%20Project%20-%20in%20Azure%20Data%20Studio.png%22%20style%3D%22width%3A%20750px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F187419i0F7F59CB2D799BA0%2Fimage-dimensions%2F750x750%3Fv%3D1.0%22%20width%3D%22750%22%20height%3D%22750%22%20title%3D%22Name%20PostgreSQL%20Project%20-%20in%20Azure%20Data%20Studio.png%22%20alt%3D%22Name%20PostgreSQL%20Project%20-%20in%20Azure%20Data%20Studio.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3COL%20start%3D%225%22%3E%0A%3CLI%3EAdd%20your%20.sql%20script%20files%20to%20the%20project%20folder.%20For%20example%20we%20will%20define%20two%20tables%2C%20%3CSTRONG%3E%E2%80%98MyTable%E2%80%99%20and%20%E2%80%98MySecondTable%2C%E2%80%99%20%3C%2FSTRONG%3Ein%20two%20different%20sql%20scripts.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Writing%20sql%20script%20for%20table%201%20-%20in%20Azure%20Data%20Studio%20Postgres.png%22%20style%3D%22width%3A%20750px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F187420i0456D089265968E9%2Fimage-dimensions%2F750x750%3Fv%3D1.0%22%20width%3D%22750%22%20height%3D%22750%22%20title%3D%22Writing%20sql%20script%20for%20table%201%20-%20in%20Azure%20Data%20Studio%20Postgres.png%22%20alt%3D%22Writing%20sql%20script%20for%20table%201%20-%20in%20Azure%20Data%20Studio%20Postgres.png%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Writing%20sql%20script%20for%20table%202%20-%20in%20Azure%20Data%20Studio%20Postgres.png%22%20style%3D%22width%3A%20750px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F187421iC803F47860A35F8A%2Fimage-dimensions%2F750x750%3Fv%3D1.0%22%20width%3D%22750%22%20height%3D%22750%22%20title%3D%22Writing%20sql%20script%20for%20table%202%20-%20in%20Azure%20Data%20Studio%20Postgres.png%22%20alt%3D%22Writing%20sql%20script%20for%20table%202%20-%20in%20Azure%20Data%20Studio%20Postgres.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3COL%20start%3D%226%22%3E%0A%3CLI%3ETo%20build%20your%20project%2C%20right-click%20your%20.pgproj%20file%2C%20and%20then%20select%20%3CSTRONG%3EBuild%20PostgreSQL%20project%3C%2FSTRONG%3E.%20Building%20your%20PostgreSQL%20project%20will%20validate%20the%20syntax%20of%20all%20the%20scripts%20in%20your%20project%20folder%20and%20generate%20an%20output%20script%20which%20can%20be%20deployed%20to%20your%20Postgres%20database%20server.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Build%20PostgreSQL%20Project%20-%20in%20Azure%20Data%20Studio%20Postgres.png%22%20style%3D%22width%3A%20750px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F187422i0D8844679D27CC72%2Fimage-dimensions%2F750x750%3Fv%3D1.0%22%20width%3D%22750%22%20height%3D%22750%22%20title%3D%22Build%20PostgreSQL%20Project%20-%20in%20Azure%20Data%20Studio%20Postgres.png%22%20alt%3D%22Build%20PostgreSQL%20Project%20-%20in%20Azure%20Data%20Studio%20Postgres.png%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLI%3E%0A%3CLI%3EAn%20output%20script%20is%20generated%20by%20the%20%E2%80%98Build%20PostgreSQL%20project%E2%80%99%20command%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Ouput%20script%20for%20Postgres%20project%20-%20in%20Azure%20Data%20Studio.png%22%20style%3D%22width%3A%20750px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F187423i7324B94E97AF9196%2Fimage-dimensions%2F750x750%3Fv%3D1.0%22%20width%3D%22750%22%20height%3D%22750%22%20title%3D%22Ouput%20script%20for%20Postgres%20project%20-%20in%20Azure%20Data%20Studio.png%22%20alt%3D%22Ouput%20script%20for%20Postgres%20project%20-%20in%20Azure%20Data%20Studio.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3COL%20start%3D%228%22%3E%0A%3CLI%3ENow%20right-click%20the%20.pgproj%20file%2C%20and%20then%20%3CSTRONG%3EDeploy%3C%2FSTRONG%3E.%20It%20will%20start%20building%20your%20project.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Deploy%20Postgres%20project%20script%20-%20in%20Azure%20Data%20Studio.png%22%20style%3D%22width%3A%20750px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F187424i69D21D53AB4F3908%2Fimage-dimensions%2F750x750%3Fv%3D1.0%22%20width%3D%22750%22%20height%3D%22750%22%20title%3D%22Deploy%20Postgres%20project%20script%20-%20in%20Azure%20Data%20Studio.png%22%20alt%3D%22Deploy%20Postgres%20project%20script%20-%20in%20Azure%20Data%20Studio.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3COL%20start%3D%229%22%3E%0A%3CLI%3EIf%20there%20is%20no%20build%20error%2C%20a%20connection%20dialog%20box%20appears%20so%20that%20you%20can%20enter%20the%20target%20database%20connection.%20Provide%20your%20database%20details%20and%20then%20select%20%3CSTRONG%3EConnect%3C%2FSTRONG%3E.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Connect%20to%20Postgres%20-%20in%20Azure%20Data%20Studio%20Postgres.png%22%20style%3D%22width%3A%20750px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F187425i18ACA27AB29B12FA%2Fimage-dimensions%2F750x750%3Fv%3D1.0%22%20width%3D%22750%22%20height%3D%22750%22%20title%3D%22Connect%20to%20Postgres%20-%20in%20Azure%20Data%20Studio%20Postgres.png%22%20alt%3D%22Connect%20to%20Postgres%20-%20in%20Azure%20Data%20Studio%20Postgres.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3COL%20start%3D%2210%22%3E%0A%3CLI%3EIf%20the%20connection%20is%20successful%2C%20the%20deploy%20operation%20now%20begins.%20The%20output%20pane%20shows%20the%20progress%20and%20notifies%20you%20of%20any%20errors.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Successful%20deployment%20of%20Postgres%20project%20script%20-%20in%20Azure%20Data%20Studio.png%22%20style%3D%22width%3A%20750px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F187426i3ED3218915092AD6%2Fimage-dimensions%2F750x750%3Fv%3D1.0%22%20width%3D%22750%22%20height%3D%22750%22%20title%3D%22Successful%20deployment%20of%20Postgres%20project%20script%20-%20in%20Azure%20Data%20Studio.png%22%20alt%3D%22Successful%20deployment%20of%20Postgres%20project%20script%20-%20in%20Azure%20Data%20Studio.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1811229815%22%20id%3D%22toc-hId-1811229815%22%3EProjects%20-%20not%20just%20for%20app%20code%3C%2FH2%3E%0A%3CP%3E%3CBR%20%2F%3EThe%20'project'%20or%20'solution'%20structure%20is%20well%20used%20in%20app%20development%20for%20a%20reason.%20A%20little%20organization%20goes%20a%20long%20way%20towards%20building%20scalable%2C%20collaborative%20code.%20Your%20Postgres%20code%20should%20get%20to%20benefit%20from%20that%20too.Important%3A%20The%20Project%20feature%20for%20Postgres%20in%20Azure%20Data%20Studio%20only%20supports%20table%20objects%20right%20now.%20Your%20feedback%20will%20help%20guide%20what's%20next%20for%20this%20feature.%20Let%20us%20know%20what%20you%20think%20at%20our%20GitHub%20repo%20for%20the%20Postgres%20extension%20to%20Azure%20Data%20Studio%E2%80%94or%20on%20Twitter%20via%26nbsp%3B%40AzureDBPostgres.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1330728%22%20slang%3D%22en-US%22%3E%3CP%3EOrganize%20and%20collaborate%20on%20your%20Postgres%20database%20scripts%20with%20Projects%20in%20Azure%20Data%20Studio%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22azuredatastudio-postgres.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F187712i50D7611F6B5E4760%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22azuredatastudio-postgres.png%22%20alt%3D%22azuredatastudio-postgres.png%22%20%2F%3E%3C%2FSPAN%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1330728%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Eazure%20data%20studio%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Epostgres%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

How do you design and deploy your Postgres code? Some of you probably define the data model directly in your application code. Deploying a new build of your app then creates and updates the objects in your Postgres database. This approach can be pretty quick and convenient, especially when you’re testing. But it has its drawbacks in production, one of which is making coordination with your DBA and other app teams more difficult.

 

Alternatively, you could create database-specific deployment scripts that are separate from your application code. This approach provides more flexibility and control over what happens to your Postgres database and when. For example, separating app and database code can help make your version upgrades cleaner. You can even have instances of your app run against different database versions as needed. If you like this approach to organizing code, Azure Data Studio wants to give you a helping hand.

 

Did you know there is a Postgres extension for Azure Data Studio?


Last year we rolled out the Postgres extension to Azure Data Studio. The integration of Postgres with Azure Data Studio is super useful if Postgres is your jam and if you prefer a graphical editor over command line options like psql. (Psql as you probably know is the most popular interactive terminal for Postgres; in fact, some users refer to psql in Postgres as their best friend).

 

More and more of our Postgres developers (well, the ones who aren’t in the cli-only camp) now use Azure Data Studio in their day to day work and in their demos. And just last month, we also rolled out an update to the Postgres extension in Azure Data Studio that allows seamless sign in using Active Directory for those of you with Azure Database for PostgreSQL - Single Server databases. Sweet.

 

Big welcome to Postgres Projects in Azure Data Studio


But back to today’s topic.

 

If you’re interested in the second approach I describe above, where you keep your application and database deployment scripts separate—what I’m calling database code isolation—we’re introducing a feature today to help make your life just a little easier: Introducing Projects for PostgreSQL in Azure Data Studio.

 

You’re probably already familiar with the idea of creating a ‘project’ or ‘solution’ to organize your app code.

 

Well this is like that but for your Postgres database. In the context of Azure Data Studio, a project is a collection of SQL script files, which can be compiled into one single deployment script you can apply to your Postgres database. Save your project to a shared Git repository and use Azure Data Studio’s source control features to collaborate across your team.

 

Getting started tour with Postgres Projects in Azure Data Studio


To get started with Postgres Projects, you need to install the latest versions of

 

Once you have installed Azure Data Studio along with the Postgres extension:

  1. Start Azure Data Studio.

    azuredatastudio-icon-border.png

  2. Select the File menu, then select Open Folder.

    Open Folder - in Azure Data Studio Postgres.png



  1. Navigate to the folder in which you want to create your project file, right-click the folder area, and then select New PostgreSQL Project.

    Select New PostgreSQL Project - in Azure Data Studio Postgres.png



  1. In the Project Name text box, specify a name for the project, and then press Enter to create. This creates your project. The project folder will now have a file with file type .pgproj, which represents the Postgres project.

    Name PostgreSQL Project - in Azure Data Studio.png



  1. Add your .sql script files to the project folder. For example we will define two tables, ‘MyTable’ and ‘MySecondTable,’ in two different sql scripts.

    Writing sql script for table 1 - in Azure Data Studio Postgres.png

    Writing sql script for table 2 - in Azure Data Studio Postgres.png



  1. To build your project, right-click your .pgproj file, and then select Build PostgreSQL project. Building your PostgreSQL project will validate the syntax of all the scripts in your project folder and generate an output script which can be deployed to your Postgres database server.

    Build PostgreSQL Project - in Azure Data Studio Postgres.png


  2. An output script is generated by the ‘Build PostgreSQL project’ command:

    Ouput script for Postgres project - in Azure Data Studio.png



  1. Now right-click the .pgproj file, and then Deploy. It will start building your project.

    Deploy Postgres project script - in Azure Data Studio.png



  1. If there is no build error, a connection dialog box appears so that you can enter the target database connection. Provide your database details and then select Connect.

    Connect to Postgres - in Azure Data Studio Postgres.png



  1. If the connection is successful, the deploy operation now begins. The output pane shows the progress and notifies you of any errors.

    Successful deployment of Postgres project script - in Azure Data Studio.png

 

Projects - not just for app code


The 'project' or 'solution' structure is well used in app development for a reason. A little organization goes a long way towards building scalable, collaborative code. Your Postgres code should get to benefit from that too.

Important:
The Project feature for Postgres in Azure Data Studio only supports table objects right now. Your feedback will help guide what's next for this feature. Let us know what you think at our GitHub repo for the Postgres extension to Azure Data Studio—or on Twitter via @AzureDBPostgres.