Sqitch - Installation on Windows

486 views
Skip to first unread message

Srinivas A.K

unread,
Nov 5, 2018, 5:01:41 AM11/5/18
to Sqitch Users
Hello,

I am not able to install the required Sqitch packages on Windows as per the instructions provided in Sqitch Website. I followed the steps regarding installing strawberry perl on windows and then tried the command mentioned for PostgreSQL "cpan App::Sqitch DBD::Pg" for installing Sqitch on my windows machine. 


Once the installation completed i tried with the other steps in the tutorial metacpan.org/pod/sqitchtutorial  as "sqitch init myproject --uri https://myproject --engine pg" but it is saying that Sqitch is not recognized as internal or external command


Can somebody please tell me the process of installing Sqitch on windows and the steps needed to maintain a database change management using Sqitch tool???


Thanks and Regards

A.K.Srinivas

Srinivas A.K

unread,
Nov 6, 2018, 2:34:44 AM11/6/18
to Sqitch Users
I tried a lot with various commands provided in the Sqitch documentation but i could not be able to install Sqitch on Windows. Please provide me a solution in fixing this so that i can continue with the next steps related to maintaining the database changes. Please do the needful as it is of high priority. 

Philip Munksgaard

unread,
Nov 6, 2018, 4:52:04 AM11/6/18
to aksrin...@gmail.com, sqitch...@googlegroups.com
Hi,

It sounds like perhaps the CPAN binary installation directory perhaps isn't included in your PATH. Could you try and figure out where CPAN installs sqitch, and then manually add that path to your system PATH?

Best,
Philip

--
You received this message because you are subscribed to the Google Groups "Sqitch Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqitch-users...@googlegroups.com.
To post to this group, send email to sqitch...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Srinivas A.K

unread,
Nov 6, 2018, 5:09:18 AM11/6/18
to Sqitch Users
I went through all the directories to check where exactly Sqitch is getting installed. But the command cpan App::Sqitch DBD::Pg is not installing sqitch on my machine.

I have performed the following list of steps:
1) Installed Strawberry Perl on my machine
2) Opened the command prompt and then issued the command "cpan App::Sqitch DBD::Pg"
3) After the installation, i have followed the steps mentioned in the documentation but i could not be able to proceed further as it is saying that "Sqitch" is not available

Is there any other alternative approach to install Sqitch on Windows ? If so can you please suggest?

David E. Wheeler

unread,
Nov 7, 2018, 9:05:18 AM11/7/18
to Srinivas A.K, Sqitch Users
On Nov 6, 2018, at 05:09, Srinivas A.K <aksrin...@gmail.com> wrote:

> I have performed the following list of steps:
> 1) Installed Strawberry Perl on my machine
> 2) Opened the command prompt and then issued the command "cpan App::Sqitch DBD::Pg"
> 3) After the installation, i have followed the steps mentioned in the documentation but i could not be able to proceed further as it is saying that "Sqitch" is not available

Please send the complete output of these commands so we can help you diagnose this problem.

> Is there any other alternative approach to install Sqitch on Windows ? If so can you please suggest?

If you’re running Docker, you can use the Sqitch Docker image:

https://github.com/sqitchers/docker-sqitch

We don’t have a batch script for running it, yet, but to manually do so, run:


docker run -it --rm --network host \
--mount "type=bind,src=%CD%,dst=/repo" \
--mount "type=bind,src=%HOME%,dst=/home" \
sqitch/sqitch help

Replace `help` with whatever sqitch command you want to use.

Hopefully we’ll be able to get a Windows batch file to simplify this soon.

HTH,

David

Srinivas A.K

unread,
Nov 8, 2018, 5:27:33 AM11/8/18
to Sqitch Users
Hi David,

Greetings !!!

Thank you very much for your response !!! 

Reference: Please send the complete output of these commands so we can help you diagnose this problem. 

Response: As per your request, i have redirected the output of these commands to a text file and the complete output is present in the attachment with the filename "SqitchInstallationLogOnWindows.txt" . Please check it and also please tell me where the actually problem is and what needs to be done in order to complete the installation on Windows. 

Few other output which are not getting displayed in the command window are copied to a text file and the file is present in the attachment with the filename "LogInCommandWindow.txt". Please check it. 

Note: The cursor is waiting for longer period of time without any notice after the warning it displayed for the version related to psql. we are unable to depict whether the installation is completed or it is still in the process

Please check the logs and provide us a solution for the clean installation of Sqitch on Windows platform. 

Reference:  If you’re running Docker, you can use the Sqitch Docker image: 

Response: I tried with docker but docker is providing support for Windows 10 operating machine and i am using Windows 7 machine. So, i tried installing Docker on Windows 10 machine present in VMWare. At last, we are facing some technical issues with the docker When trying to verify the installation of docker, it is saying that the docker daemon is not running.

Please provide us with your valuable suggestions on how to proceed further in installing sqitch on windows and proceed with the database change management. We are very much eager to see output and very keen to use this for our project.

Thanks and Regards,
A.K.Srinivas
SqitchInstallationLogOnWindows.txt

Srinivas A.K

unread,
Nov 8, 2018, 5:32:49 AM11/8/18
to Sqitch Users
Forgot to attach another log file with the file name "LogInCommandWindow.txt". So sending you as attachment. Please check it

David E. Wheeler

unread,
Nov 11, 2018, 11:56:42 AM11/11/18
to Srinivas A.K, Sqitch Users
On Nov 8, 2018, at 05:27, Srinivas A.K <aksrin...@gmail.com> wrote:

> Hi David,
>
> Greetings !!!
>
> Thank you very much for your response !!!

Hello. You’re welcome.

> Response: As per your request, i have redirected the output of these commands to a text file and the complete output is present in the attachment with the filename "SqitchInstallationLogOnWindows.txt" . Please check it and also please tell me where the actually problem is and what needs to be done in order to complete the installation on Windows.

That file stops right in the middle of the Sqitch tests:

Building App-Sqitch
DWHEELER/App-Sqitch-0.9998.tar.gz
C:\Strawberry\perl\bin\perl.exe ./Build -- OK
Running Build test
t/add.t ............. ok
t/base.t ............ ok
t/blank.t ........... ok
t/bundle.t .......... ok
t/change.t .......... ok
t/changelist.t ...... ok
t/checkout.t ........ ok
t/command.t ......... ok
t/config.t .......... ok
t/configuration.t ... ok
t/datetime.t ........ ok
t/depend.t .......... ok
t/deploy.t .......... ok
t/engine.t .......... ok
t/engine_cmd.t ...... ok
t/exasol.t .......... ok
t/firebird.t ........ ok
t/help.t ............ ok
t/init.t ............ ok
t/item_formatter.t .. ok
t/linelist.t ........ ok
t/log.t ............. ok
t/mooseless.t ....... ok
t/mysql.t ........... ok
t/options.t ......... ok
t/oracle.t .......... ok


Was that it? Was there no more output? Something’s missing there. But if it got hung up, that would explain why Sqitch isn’t installed.

> Few other output which are not getting displayed in the command window are copied to a text file and the file is present in the attachment with the filename "LogInCommandWindow.txt". Please check it.

Hrm. That file appears to be empty. I wonder if the list server stopped it out. Could you try sending it again, maybe with a different suffix?

> Response: I tried with docker but docker is providing support for Windows 10 operating machine and i am using Windows 7 machine. So, i tried installing Docker on Windows 10 machine present in VMWare. At last, we are facing some technical issues with the docker When trying to verify the installation of docker, it is saying that the docker daemon is not running.

It might be a separate app you have to start. That’s the way it works on macOS.

Best,

David

Srinivas A.K

unread,
Nov 12, 2018, 6:04:00 AM11/12/18
to Sqitch Users

Hi David,

Greetings !!!

Reference: Was that it? Was there no more output? Something’s missing there. But if it got hung up, that would explain why Sqitch isn’t installed.
Response:  Yes this is the output we have obtained and there were no other output as it got hung up 

Tried another Alternative Way

Today i tried another alternative way by enabling  WSL on Windows 10 "Windows Subsystem for Linux" so that i can install Sqitch using Linux commands. So i have issued the command "apt-get install sqitch" in bash command prompt of Linux and the output is as shown below

root@CUIT1:/mnt/c/Windows/System32# apt-get install sqitch
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package sqitch

It could not be able to locate the package...Can you please suggest on what needs to be done for installing the Sqitch package ?

David E. Wheeler

unread,
Nov 12, 2018, 9:21:06 PM11/12/18
to Srinivas A.K, Sqitch Users
On Nov 12, 2018, at 06:04, Srinivas A.K <aksrin...@gmail.com> wrote:

> Response: Yes this is the output we have obtained and there were no other output as it got hung up

Hrm. Do you have Oracle installed locally? Weird that it would hang on the oracle test.

> Tried another Alternative Way
>
> Today i tried another alternative way by enabling WSL on Windows 10 "Windows Subsystem for Linux" so that i can install Sqitch using Linux commands. So i have issued the command "apt-get install sqitch" in bash command prompt of Linux and the output is as shown below
>
> root@CUIT1:/mnt/c/Windows/System32# apt-get install sqitch
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> E: Unable to locate package sqitch
>
> It could not be able to locate the package...Can you please suggest on what needs to be done for installing the Sqitch package ?

Well, if it’s just installing Debian packages, try following these instructions:

https://sqitch.org/#debian

I have to admit, however, that I have no idea whether or not it will work.

D

signature.asc

Srinivas A.K

unread,
Nov 13, 2018, 12:04:47 AM11/13/18
to Sqitch Users

Hello David

Reference:  Do you have Oracle installed locally? Weird that it would hang on the oracle test. 
Response:   No, We are working towards PostgreSQL databases and hence PostgreSQL database instances are installed on my machine in order to install Sqitch

Reference:  Well, if it’s just installing Debian packages,
Response:   I have installed Debian packages only and when i tried to install Sqitch using the commands mentioned in  https://sqitch.org/#debian , i am getting the error as "Unable to locate the package"

Srinivas A.K

unread,
Nov 13, 2018, 1:32:02 AM11/13/18
to Sqitch Users
Hi David,

Yesterday, i forgot to send you the logs that are generated during the installation process of Sqitch on Windows. Please check the attachments for the logs that is being shown in the terminal window (LogPresentinCommand) and the log which got redirected to text file(SqitchInstallationSteps). Please check the attachments regarding the same

Please suggest on how Sqitch can be installed on Windows Operating System. 
LogPresentinCommand.txt
SqitchInstallationSteps.txt

David E. Wheeler

unread,
Nov 13, 2018, 9:27:46 PM11/13/18
to Srinivas A.K, Sqitch Users
On Nov 13, 2018, at 01:32, Srinivas A.K <aksrin...@gmail.com> wrote:

> Yesterday, i forgot to send you the logs that are generated during the installation process of Sqitch on Windows. Please check the attachments for the logs that is being shown in the terminal window (LogPresentinCommand) and the log which gotredirected to text file(SqitchInstallationSteps). Please check the attachments regarding the same

'--nosuchscript.ply--' is not recognized as an internal or external command,
operable program or batch file.
psql: warning: extra command-line argument "--quiet" ignored
psql: warning: extra command-line argument "--no-psqlrc" ignored
psql: warning: extra command-line argument "--no-align" ignored
psql: warning: extra command-line argument "--tuples-only" ignored
psql: warning: extra command-line argument "--set" ignored
psql: warning: extra command-line argument "ON_ERROR_STOP=1" ignored
psql: warning: extra command-line argument "--set" ignored
psql: warning: extra command-line argument "registry=sqitch" ignored
psql: warning: extra command-line argument "--command" ignored
psql: warning: extra command-line argument "SELECT" ignored
psql: warning: extra command-line argument "version()” ignored

Bah, this is an issue that’s fixed in the latest release of Sqitch (v0.9998); not sure what version you’re trying to install here.

I’m less sure about the other errors in the file; they appear to be warnings, mostly, which you can ignore. But some may not be, and I can’t tell.


In the second file, it looks like it’s making good progress installing Sqitch; I can’t understand why it stops on the t/oracle.t test, though. Try installing it without running tests:

cpan -T App::Sqitch DBD::Pg

Best,

David

signature.asc

Srinivas A.K

unread,
Nov 14, 2018, 4:13:11 AM11/14/18
to Sqitch Users
Hi David,

Thank you very much for your response !!!. 

Reference: this is an issue that’s fixed in the latest release of Sqitch (v0.9998); not sure what version you’re trying to install here. 
Response:  I am using the latest release of Sqitch Version i.e v0.9998 only. Please check the screenshot attached regarding the version that is currently getting installed on my machine

Reference: Try installing it without running tests:  cpan -T App::Sqitch DBD::Pg 
Response: I have tried the statement provided by you and now it worked perfectly... Sqitch got installed on my machine.  Thank you very much for your command !!!

Now I am able to create deploy, revert and verify scripts using Sqitch but when i try to deploy , i am getting the following error. Can you please tell me what needs to be done in order to fix this error

C:\SqitchTesting\deployment>sqitch deploy db:pg://myusername:mypassword@hostname:port/databasename
Adding registry tables to db:pg://myusername:@hostname:port/databasename
psql: warning: extra command-line argument "host=localhost" ignored
psql: warning: extra command-line argument "port=5432" ignored
psql: warning: extra command-line argument "--quiet" ignored
psql: warning: extra command-line argument "--no-psqlrc" ignored
psql: warning: extra command-line argument "--no-align" ignored
psql: warning: extra command-line argument "--tuples-only" ignored
psql: warning: extra command-line argument "--set" ignored
psql: warning: extra command-line argument "ON_ERROR_STOP=1" ignored
psql: warning: extra command-line argument "--set" ignored
psql: warning: extra command-line argument "registry=sqitch" ignored
psql: warning: extra command-line argument "-c" ignored
psql: warning: extra command-line argument "SHOW" ignored
psql: warning: extra command-line argument "server_version_num" ignored
SqitchVersion.JPG

David E. Wheeler

unread,
Nov 14, 2018, 7:42:25 PM11/14/18
to Srinivas A.K, Sqitch Users

On Nov 14, 2018, at 04:13, Srinivas A.K <aksrin...@gmail.com> wrote

> Response: I am using the latest release of Sqitch Version i.e v0.9998 only. Please check the screenshot attached regarding the version that is currently getting installed on my machine

Crap.

> Response: I have tried the statement provided by you and now it worked perfectly... Sqitch got installed on my machine. Thank you very much for your command !!!

Great.

> Now I am able to create deploy, revert and verify scripts using Sqitch but when i try to deploy , i am getting the following error. Can you please tell me what needs to be done in order to fix this error
>
> C:\SqitchTesting\deployment>sqitch deploy db:pg://myusername:mypassword@hostname:port/databasename
> Adding registry tables to db:pg://myusername:@hostname:port/databasename
> psql: warning: extra command-line argument "host=localhost" ignored
> psql: warning: extra command-line argument "port=5432" ignored
> psql: warning: extra command-line argument "--quiet" ignored
> psql: warning: extra command-line argument "--no-psqlrc" ignored
> psql: warning: extra command-line argument "--no-align" ignored
> psql: warning: extra command-line argument "--tuples-only" ignored
> psql: warning: extra command-line argument "--set" ignored
> psql: warning: extra command-line argument "ON_ERROR_STOP=1" ignored
> psql: warning: extra command-line argument "--set" ignored
> psql: warning: extra command-line argument "registry=sqitch" ignored
> psql: warning: extra command-line argument "-c" ignored
> psql: warning: extra command-line argument "SHOW" ignored
> psql: warning: extra command-line argument "server_version_num” ignored

What’s the output of `sqitch —version`?

Also, there is a bug in a Perl module that will have to be patched.

https://github.com/pjf/ipc-system-simple/pull/29

I’ve just left another comment asking for a release. But in the meantime, you can patch your install by making the changes to `lib/IPC/System/Simple.pm` listed in that pull request. Sorry it isn’t simpler. :-(

Best,

David

signature.asc

Srinivas A.K

unread,
Nov 15, 2018, 2:04:45 AM11/15/18
to Sqitch Users
Hi David,

Thank you very much for your quick response !!!

Reference: What’s the output of `sqitch —version`? 
Response:  The output i have received after running the above command is "Sqitch <App::Sqitch> 0.9998"

Reference:  But in the meantime, you can patch your install by making the changes to `lib/IPC/System/Simple.pm` listed in that pull request.
Response:   As per your suggestions, i have made necessary changes only to the "Simple.pm" file listed in the pull request. After making changes and when i run the command "C:\SqitchTesting\deployment>sqitch deploy db:pg://myusername:mypassword@hostname:port/databasename" then i am getting the following list of errors. 

Error Message

IPC::System::Simple does not define $IPC::System::Simple::VERSION--version check
 failed at C:/Strawberry/perl/site/lib/App/Sqitch.pm line 22.

BEGIN failed--compilation aborted at C:/Strawberry/perl/site/lib/App/Sqitch.pm l
ine 22.

Compilation failed in require at C:\Strawberry\perl\site\bin/sqitch line 12.

BEGIN failed--compilation aborted at C:\Strawberry\perl\site\bin/sqitch line 12.

I am not sure if i had made the necessary changes to the "Simple.pm" file. So, i am sending you the "Simple.pm" file that contains all the changes i made as an attachment. Please check it and let me know whether the changes i made are correct or where i exactly went wrong? 

Thank you very much for all your kind support till now

Thanks and Regards
A.K.Srinivas
Simple.pm

David E. Wheeler

unread,
Nov 15, 2018, 6:58:43 PM11/15/18
to Srinivas A.K, Sqitch Users
On Nov 15, 2018, at 02:04, Srinivas A.K <aksrin...@gmail.com> wrote:

> IPC::System::Simple does not define $IPC::System::Simple::VERSION--version check
> failed at C:/Strawberry/perl/site/lib/App/Sqitch.pm line 22.

Change line 89 to

our $VERSION = '1.25'; # VERSION : From dzil

HTH,

David

signature.asc

Srinivas A.K

unread,
Nov 20, 2018, 5:17:15 AM11/20/18
to Sqitch Users
Hi David,

Thank you very much for your help !!! I am able to deploy my sample SQL scripts to my respective database.

I have a question related to deployment. Can Sqitch be able to publish new updates to PostgreSQL database from the SQL scripts which we store in our TFS(Team Foundation Server) source control? Is there any chance/possible that the new changes/updates can be published from our TFS?

Please suggest !!!!

David E. Wheeler

unread,
Nov 21, 2018, 9:17:13 AM11/21/18
to Srinivas A.K, Sqitch Users
On Nov 20, 2018, at 05:17, Srinivas A.K <aksrin...@gmail.com> wrote:

> Thank you very much for your help !!! I am able to deploy my sample SQL scripts to my respective database.

Oh good, I’m so glad to know my fix for IPC::System::Simple does the trick. Will need to get Paul to release it.

> I have a question related to deployment. Can Sqitch be able to publish new updates to PostgreSQL database from the SQL scripts which we store in our TFS(Team Foundation Server) source control? Is there any chance/possible that the new changes/updates can be published from our TFS?

I’ve never heard of TFS, but Sqitch operates on a repository that consists of a configuration file, a plan file, and directors of deploy, revert, and verify scripts. Anywhere you can make those files available and run Sqitch will do the trick.

/me DuckDuckGoes…

https://en.wikipedia.org/wiki/Team_Foundation_Server

I see, it’s a VCS, yes? Most folks use Git for their Sqitch projects, so I don’t imagine it’s a whole lot different. Have you read the tutorial?

https://metacpan.org/pod/sqitchtutorial

Best,

David

signature.asc

Srinivas A.K

unread,
Nov 22, 2018, 5:04:13 AM11/22/18
to Sqitch Users
Hi David,

Greetings !!!

Reference: I see, it’s a VCS, yes? Most folks use Git for their Sqitch projects, so I don’t imagine it’s a whole lot different. Have you read the tutorial? 
Response:  Yes... its a Version Control System.We mostly use Microsoft TFS for check-outs, check-ins and maintain history for all the changes we made to the scripts .

Recently we came up with an idea of Migrating our entire MSSQL database to an Open Source and we have chosen PostgreSQL for it . Keeping in view of this migration, we are in search of Database Change Management system and we came across Sqitch.  Now, We are in need of a requirement where we can be able to publish new updates to PostgreSQL database from the SQL scripts which we store in our TFS(Team Foundation Server) source control.

Yes, Of course I have read the tutorial and it is mostly using the GIT to create a source code repository.

Thanks and Regards,
A.K.Srinivas

David E. Wheeler

unread,
Nov 22, 2018, 3:39:26 PM11/22/18
to Srinivas A.K, Sqitch Users
On Nov 22, 2018, at 05:04, Srinivas A.K <aksrin...@gmail.com> wrote:

> Yes, Of course I have read the tutorial and it is mostly using the GIT to create a source code repository.

I’ve not used TFS, but I would think that most of the concepts would translate, no?

Best,

David

signature.asc
Reply all
Reply to author
Forward
0 new messages