https://github.com/msadeqsirjani/schemadiff
Script and create SQL Server objects quickly
https://github.com/msadeqsirjani/schemadiff
c-sharp database mssql schema version-control
Last synced: 2 months ago
JSON representation
Script and create SQL Server objects quickly
- Host: GitHub
- URL: https://github.com/msadeqsirjani/schemadiff
- Owner: msadeqsirjani
- License: mit
- Created: 2021-08-27T14:37:12.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-12-14T06:05:54.000Z (over 4 years ago)
- Last Synced: 2025-08-08T05:44:58.605Z (11 months ago)
- Topics: c-sharp, database, mssql, schema, version-control
- Language: TSQL
- Homepage:
- Size: 180 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Schema Diff - Script and create SQL Server objects quickly
## Schema Diff has three main commands:
### SCRIPT
```bash
SchemaDiff.exe script --server localhost --database db --scriptDir c:\somedir
```
This will generate sql scripts for all objects in the database in a
directory structure that looks something like:
```
c:\somedir\
data
foreign_keys
procedures
tables
views
props.sql
schemas.sql
```
### CREATE
```bash
SchemaDiff.exe create --server localhost --database db --scriptDir c:\somedir
```
This will create a database named db from the sql scripts in c:\somedir.
### COMPARE
```bash
SchemaDiff.exe compare --source "server=dev;database=db;user id=###;password=###" --target "server=qa;database=db;user id=###;password=###" --outFile diff.sql
```
This will compare the databases named `db` between `dev` and `qa` and
create a sql script called `diff.sql` that can be run on `qa` to make it's
schema identical to `dev`.
See ```SchemaDiff.exe help [command]``` for more information and options on each command.
## DOWNLOAD
The latest release can be downloaded [here](https://github.com/msadeqsirjani/SchemaDiff/releases)
## CONTRIBUTING
Pull requests are welcome and appreciated.