How to add all database objects to version control?

已完成

Hi, I wanto to introspect and add all database objects to my git using Datagrip.

For example, add all database objects (tables/views/stored procedures etc) to different folders separated by schema name, so when I make a change to schema, it's reflected in git changes. 

What I want is something similar to Visual studio database projects, where you can import a database as project. 

 

Idealistically I want to commit my changes to git before commiting them into databse, in a way that it's readable for colleages in their git log.

I read the guides and documentations, but there is nothing about how to setup a projects, it's all about cloning a prepared example database with few .sql files

0

Hi. Have you read this article?

 

0

@... Thanks for sharing. I checked that article, but seems either my version is outdated or the documentation (otherwise it doesn't suppor the SQL Server). I can't find this option:

In the Database Explorer (View | Tool Windows | Database Explorer), right-click a data source that you want to dump to a DDL data source and select SQL Scripts | Dump to DDL Data Source.

My datagrip version 2021.1

my database: SQL Server 2016

0

请先登录再写评论。