0

I'm seeking any best-practice documentation you might have that describes your recommendations for deploying applications which have been built on CodeFluent Entities. We're using CodeFluent (licensed through the University of Western Sydney) for our projects with the Australian Consortium for Classification Development (https://www.accd.net.au) and would like to avoid using other third-party tools if possible. I've had a quick look on SoftFluent's new website's Knowledge Center but haven't found anything which addresses this issue

  • Are you just referring to database deployment? – Dave Oct 22 '15 at 13:21
  • Also which database are you using? – Dave Oct 22 '15 at 17:53
  • We're using SQL Server 2012 and yes, we're only looking for database deployment guidelines. I use Red-Gate SQL Compare and SQL Data Compare in other projects but we don't have license for these tools at ACCD (yet). I'm just concerned that there doesn't appear to be any straightforward way to deploy database changes to production if you've gone through several builds and database changes in your development environment first. SQL Compare compares any two instances and scripts the necessary changes and you do this just before you deploy to production, CodeFluent doesn't appear to do this –  Oct 25 '15 at 21:31
  • Codefluent has a diff engine. Just use the appropriate producte (eg SQL server), configure the target and rebuild the project. You can run the diff scripts immidiately or just build them, review them and run them manually. We are using the SQL Server producer diff engine on all stages of our DTAP, even in production. Works perfectly well. In a distrubuted environment (multiple detabases I assume we would use the pivot runner). – Peter de Bruijn Jul 11 '16 at 07:12

1 Answers1

2

CodeFluent Entities provides two ways to update the database schema, and SQL Server also has one.

Pivot Runner

http://blog.codefluententities.com/2013/10/10/the-new-sql-server-pivot-script-producer/

  • Generation time: The SQL Server Pivot Script Producer generates an XML file that describes the schema of the database (table, columns, keys, stored procedures, etc.).
  • Deployment time: The Pivot Runner read this file and update the target database to match the target schema.

You can run the PivotRunner using the provided client CodeFluent.Runtime.Database.Client.exe or use your own program:

PivotRunner runner = new PivotRunner(pivotPath);
runner.ConnectionString = "<SQL Server connection string>";
runner.Run();

SQL Server producer diff engine

The SQL Server Producer generates a diff script. So you can run this script on the target database.

Data-tier Application (dacpac)

not CodeFluent Entities related

A data-tier application (DAC) defines all the SQL Server Database Engine schema and instance objects (such as tables, views, and logins) required to support an application. A DAC is built into a DAC package, which is an XML file containing a manifest that defines all the Database Engine objects used by the application, and is used to deploy the DAC. A DAC simplifies the management of the data-tier objects by providing a single unit for deployment and management.

meziantou
  • 20,589
  • 7
  • 64
  • 83