Skip to content

Commit

Permalink
add mysql examples into commadline help
Browse files Browse the repository at this point in the history
  • Loading branch information
max-ieremenko committed Jul 18, 2021
1 parent d0572cd commit 2420bc1
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,8 @@ example: create new "NewDatabase" on MSSQL "server" based on scripts from "C:\Ne
example: create new "NewDatabase" on PostgreSQL "server" based on scripts from "C:\NewDatabase" with "Variable1=value1" and "Variable2=value2"
> SqlDatabase create "-database=Host=localhost;Username=postgres;Database=NewDatabase" -from=C:\NewDatabase -varVariable1=value1 -varVariable2=value2

example: create new "NewDatabase" on MySQL "server" based on scripts from "C:\NewDatabase" with "Variable1=value1" and "Variable2=value2"
> SqlDatabase create "-database=Server=localhost;Database=NewDatabase;User ID=root;Password=qwerty;" -from=C:\NewDatabase -varVariable1=value1 -varVariable2=value2

example: use previous example with -whatIf options to show steps without execution
> SqlDatabase create "-database=Data Source=server;Initial Catalog=NewDatabase;Integrated Security=True" -from=C:\NewDatabase -varVariable1=value1 -varVariable2=value2 -whatIf
3 changes: 3 additions & 0 deletions Sources/SqlDatabase/Configuration/CommandLine.create.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,8 @@ example: create new "NewDatabase" on MSSQL "server" based on scripts from "C:\Ne
example: create new "NewDatabase" on PostgreSQL "server" based on scripts from "C:\NewDatabase" with "Variable1=value1" and "Variable2=value2"
> SqlDatabase create "-database=Host=localhost;Username=postgres;Database=NewDatabase" -from=C:\NewDatabase -varVariable1=value1 -varVariable2=value2

example: create new "NewDatabase" on MySQL "server" based on scripts from "C:\NewDatabase" with "Variable1=value1" and "Variable2=value2"
> SqlDatabase create "-database=Server=localhost;Database=NewDatabase;User ID=root;Password=qwerty;" -from=C:\NewDatabase -varVariable1=value1 -varVariable2=value2

example: use previous example with -whatIf options to show steps without execution
> SqlDatabase create "-database=Data Source=server;Initial Catalog=NewDatabase;Integrated Security=True" -from=C:\NewDatabase -varVariable1=value1 -varVariable2=value2 -whatIf
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,8 @@ example: execute scripts from "c:\Scripts\script.sql" on "MyDatabase" on MSSQL "
example: execute scripts from "c:\Scripts\script.sql" on "MyDatabase" on PostgreSQL "server" with "Variable1=value1" and "Variable2=value2"
> SqlDatabase execute "-database=Host=localhost;Username=postgres;Database=MyDatabase" -from=c:\Scripts\script.sql -varVariable1=value1 -varVariable2=value2

example: execute scripts from "c:\Scripts\script.sql" on "MyDatabase" on MySQL "server" with "Variable1=value1" and "Variable2=value2"
> SqlDatabase execute "-database=Server=localhost;Database=NewDatabase;User ID=root;Password=qwerty;" -from=c:\Scripts\script.sql -varVariable1=value1 -varVariable2=value2

example: use previous example with -whatIf options to show steps without execution
> SqlDatabase execute "-database=Data Source=server;Initial Catalog=MyDatabase;Integrated Security=True" -from=c:\Scripts\script.sql -varVariable1=value1 -varVariable2=value2 -whatIf
3 changes: 3 additions & 0 deletions Sources/SqlDatabase/Configuration/CommandLine.execute.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,8 @@ example: execute scripts from "c:\Scripts\script.sql" on "MyDatabase" on MSSQL "
example: execute scripts from "c:\Scripts\script.sql" on "MyDatabase" on PostgreSQL "server" with "Variable1=value1" and "Variable2=value2"
> SqlDatabase execute "-database=Host=localhost;Username=postgres;Database=MyDatabase" -from=c:\Scripts\script.sql -varVariable1=value1 -varVariable2=value2

example: execute scripts from "c:\Scripts\script.sql" on "MyDatabase" on MySQL "server" with "Variable1=value1" and "Variable2=value2"
> SqlDatabase execute "-database=Server=localhost;Database=NewDatabase;User ID=root;Password=qwerty;" -from=c:\Scripts\script.sql -varVariable1=value1 -varVariable2=value2

example: use previous example with -whatIf options to show steps without execution
> SqlDatabase execute "-database=Data Source=server;Initial Catalog=MyDatabase;Integrated Security=True" -from=c:\Scripts\script.sql -varVariable1=value1 -varVariable2=value2 -whatIf
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@ example: export data from sys.tables view into "c:\tables.sql" from "master" dat
> SqlDatabase export "-database=Data Source=server;Initial Catalog=master;Integrated Security=True" "-fromSql=SELECT * FROM sys.tables" -toFile=c:\tables.sql

example: export data from information_schema.tables view into "c:\tables.sql" from "postgres" database on PostgreSQL "server"
> SqlDatabase export "-database=Host=localhost;Username=postgres;Database=postgres" "-fromSql=SELECT * FROM information_schema.tables" -toFile=c:\tables.sql
> SqlDatabase export "-database=Host=localhost;Username=postgres;Database=postgres" "-fromSql=SELECT * FROM information_schema.tables" -toFile=c:\tables.sql

example: export data from information_schema.tables view into "c:\tables.sql" from "sys" database on MySQL "server"
> SqlDatabase export "-database=Server=localhost;Database=sys;User ID=root;Password=qwerty;" "-fromSql=SELECT * FROM information_schema.tables" -toFile=c:\tables.sql
5 changes: 4 additions & 1 deletion Sources/SqlDatabase/Configuration/CommandLine.export.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@ example: export data from sys.tables view into "c:\tables.sql" from "master" dat
> SqlDatabase export "-database=Data Source=server;Initial Catalog=master;Integrated Security=True" "-fromSql=SELECT * FROM sys.tables" -toFile=c:\tables.sql

example: export data from information_schema.tables view into "c:\tables.sql" from "postgres" database on PostgreSQL "server"
> SqlDatabase export "-database=Host=localhost;Username=postgres;Database=postgres" "-fromSql=SELECT * FROM information_schema.tables" -toFile=c:\tables.sql
> SqlDatabase export "-database=Host=localhost;Username=postgres;Database=postgres" "-fromSql=SELECT * FROM information_schema.tables" -toFile=c:\tables.sql

example: export data from information_schema.tables view into "c:\tables.sql" from "sys" database on MySQL "server"
> SqlDatabase export "-database=Server=localhost;Database=sys;User ID=root;Password=qwerty;" "-fromSql=SELECT * FROM information_schema.tables" -toFile=c:\tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,8 @@ example: upgrade "MyDatabase" on MSSQL "server", migration steps from "C:\Migrat
example: upgrade "MyDatabase" on PostgreSQL "server", migration steps from "C:\MigrationSteps" with "Variable1=value1" and "Variable2=value2"
> SqlDatabase upgrade "-database=Host=localhost;Username=postgres;Database=MyDatabase" -from=C:\MigrationSteps -varVariable1=value1 -varVariable2=value2

example: upgrade "MyDatabase" on MySQL "server", migration steps from "C:\MigrationSteps" with "Variable1=value1" and "Variable2=value2"
> SqlDatabase upgrade "-database=Server=localhost;Database=NewDatabase;User ID=root;Password=qwerty;" -from=C:\MigrationSteps -varVariable1=value1 -varVariable2=value2

example: use previous example with -whatIf options to show steps without execution
> SqlDatabase upgrade "-database=Data Source=server;Initial Catalog=MyDatabase;Integrated Security=True" -from=C:\MigrationSteps -varVariable1=value1 -varVariable2=value2 -whatIf
3 changes: 3 additions & 0 deletions Sources/SqlDatabase/Configuration/CommandLine.upgrade.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ example: upgrade "MyDatabase" on MSSQL "server", migration steps from "C:\Migrat
example: upgrade "MyDatabase" on PostgreSQL "server", migration steps from "C:\MigrationSteps" with "Variable1=value1" and "Variable2=value2"
> SqlDatabase upgrade "-database=Host=localhost;Username=postgres;Database=MyDatabase" -from=C:\MigrationSteps -varVariable1=value1 -varVariable2=value2

example: upgrade "MyDatabase" on MySQL "server", migration steps from "C:\MigrationSteps" with "Variable1=value1" and "Variable2=value2"
> SqlDatabase upgrade "-database=Server=localhost;Database=NewDatabase;User ID=root;Password=qwerty;" -from=C:\MigrationSteps -varVariable1=value1 -varVariable2=value2

example: use previous example with -whatIf options to show steps without execution
> SqlDatabase upgrade "-database=Data Source=server;Initial Catalog=MyDatabase;Integrated Security=True" -from=C:\MigrationSteps -varVariable1=value1 -varVariable2=value2 -whatIf

0 comments on commit 2420bc1

Please sign in to comment.