web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Create a Dataverse dat...
Power Apps
Answered

Create a Dataverse database using a SQL create script (or other script)

(1) ShareShare
ReportReport
Posted on by 21

I know Microsoft wants us to use Dataverse as the back-end for Power Apps (I want to too).


In a previous life, as a developer, I would design databases using a schema editor and generate SQL create scripts that would allow me to bring up and tear down MySQL databases very quickly. I could also add dummy data easily by just running the script.


Is there an equivalent design workflow for Dataverse. I just find using GUI to build databases with many tables and columns very challenging. I much prefer working in a schema editor or a text-based script.

What about version control on database designs? How is that handled?

I have the same question (0)
  • Verified answer
    ChrisPiasecki Profile Picture
    6,422 Most Valuable Professional on at

    Hi @nolanfromcanada,

     

    I am afraid there is no such thing. You can use the Web API or SDKs to programmatically create metadata, or even go as far as to write your own schema editor, but the metadata is much more in depth and complex compared to standard T-SQL DDL. I don't think the end result would be any faster than the UI for this type of thing, especially when you consider scripts are more prone to errors.

     

    With regards to managing in source control, you can use the Solution Packager to Unpack a solution into its XML format which is source control friendly. Have a look at the reference below at the tools available. There are also build tools provided by Microsoft for Azure DevOps and Github Actions that use these tools under the hood to Automate build and deployment processes. 

     

    https://docs.microsoft.com/en-us/power-platform/alm/configure-and-deploy-tools

     

    https://docs.microsoft.com/en-us/power-platform/alm/devops-build-tools

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

     

  • Fubar Profile Picture
    8,487 Super User 2026 Season 1 on at

    Putting all your changes in Solution files is how you facilitate the movement and setup of new environments etc.

     

    You could possibly look at XrmToolBox.com there are a couple of plugins: MS Sql To CRM Import, Attributes Factory, Attributes Creator. 

     

    You do also need to be mindful that there are a lot of out-of-the-box fields on pre-existing entities and try not to re-create ones that already exist e.g. multiple fields with the same Display Name are allowed (unique schema but non-unique display name) and the users and often your general usage is Display Name,

  • court2 Profile Picture
    5 on at

    I'm struggling with this huge inefficency, as well, as I contemplate building a database in dataverse. The workflow of 'create one field, hit save, wait 7 seconds, repeat' is not conducive to maintaining enthusiasm or sanity.

    I think dataverse can now upload from more sources--maybe even SQL. That won't help me with only Excel and Access (I know there are connectors for these, too, but Excel / csv seems to be pretty fragile based on my starting point.)

    Would love any thoughts / updates on best practices for getting a whole schema into Dataverse quickly. Anything but the current 'workflow'!

  • KrishanG Profile Picture
    6 on at

    I find creating tables schema extremely painful using this ui editor in Dataverse.  For people who have been doing lots of back end development the UI actually constrains you and slows you down. 

     

    I disagree with what you say, the scripting method will be faster for a developer who already has  table schema close to what needs to be transformed too, and all one needs to do is add or subtract any fields not required and execute the script which would create the entire table.   Hope this functionality of writing T-SQL will be brought into PowerApps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard