Skip to content

Instantly share code, notes, and snippets.

View jonathanhickford's full-sized avatar

Jonathan Hickford jonathanhickford

  • Triptease
  • Cambridge, UK
View GitHub Profile
@jonathanhickford
jonathanhickford / gist:1cb0d6665adab8b9c664
Created June 23, 2014 10:29
AppVeyor - Wait for database to start
$tries = 5;
$pause = 10; # Seconds to wait between tries
While ($tries -gt 0) {
try {
$ServerConnectionString = "Data Source=(local)\SQL2012SP1;Initial Catalog=master;User Id=sa;PWD=Password12!";
$ServerConnection = new-object system.data.SqlClient.SqlConnection($ServerConnectionString);

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@jonathanhickford
jonathanhickford / 01_setup.sql
Created May 19, 2015 08:21
DB Migration Test Example
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Users](
[id] [INT] IDENTITY(1,1) NOT NULL,
[client_product_code] [NVARCHAR](50) NULL,
CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED