-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from redmatter/1.0_dump_populate_cleanup
v1.0 - Adding dump populate cleanup options
- Loading branch information
Showing
7 changed files
with
679 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
-- schema | ||
|
||
-- | ||
-- Table structure for table `Audit` | ||
-- | ||
|
||
CREATE TABLE IF NOT EXISTS `DemoWarehouse`.`Audit` ( | ||
`OrganisationID` int(10) unsigned NOT NULL, | ||
`UserID` int(10) unsigned DEFAULT NULL, | ||
`Time` datetime NOT NULL, | ||
`JSON` text NOT NULL, | ||
|
||
KEY `UserID` (`UserID`), | ||
KEY `OrganisationID` (`OrganisationID`), | ||
KEY `Time` (`Time`) | ||
); | ||
|
||
ALTER TABLE `Audit` | ||
ADD FOREIGN KEY (`OrganisationID`) REFERENCES `DemoConfig`.`Organisation`(`ID`) | ||
ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- data | ||
|
||
-- `DemoWarehouse`.`Audit` | ||
INSERT INTO `DemoWarehouse`.`Audit` VALUES | ||
(1,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(2,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(3,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(4,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(5,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(6,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(7,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(8,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(9,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(10,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(11,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(12,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(13,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(14,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(15,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(16,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(17,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(18,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(19,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(20,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(21,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(22,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(23,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(24,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(25,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(26,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(27,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(28,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(29,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(30,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(31,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(32,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(33,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(34,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(35,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(36,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(37,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(38,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(39,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(40,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(41,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(42,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(43,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(44,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(45,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(46,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(47,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(48,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(49,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(50,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(51,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(52,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(53,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(54,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(55,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(56,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(57,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(58,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(59,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(60,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(61,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(62,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(63,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(64,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(65,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(66,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(67,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(68,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(69,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(70,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(71,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(72,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(73,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(74,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(75,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(76,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(77,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(78,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(79,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(80,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(81,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(82,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(83,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(84,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(85,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(86,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(87,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(88,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(89,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(90,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(91,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(92,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(93,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(94,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(95,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(96,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(97,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(98,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(99,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'), | ||
(100,NULL,'2016-06-17 12:35:59','{\"Description\": \"Organisation created\", \"OrderNumber\": 15371}'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,18 +12,26 @@ public function tryToTest(AcceptanceTester $I) | |
|
||
$user_id = $I->transaction(function () use ($I) { | ||
$I->executeSql('SELECT NOW()'); | ||
$user_id = $I->haveInDb('PrimaryDb.User', [ | ||
'UserName'=>'[email protected]', | ||
$user_id = $I->haveInDb('DemoConfig.User', [ | ||
'OrganisationID'=>1, | ||
'Name'=>'Some One', | ||
'CreatedAt'=>'@asis NOW()' | ||
'Email'=>'[email protected]', | ||
'Address'=>'PO Box 1213, London, United Kingdom', | ||
'Active'=>'YES', | ||
]); | ||
$I->haveInDb('PrimaryDb.UserPassword', [ | ||
$I->haveInDb('DemoConfig.UserPassword', [ | ||
'UserID'=>$user_id, | ||
'Password'=>'topsecret', | ||
'CreatedAt'=>'@asis NOW()' | ||
'Hash'=>'@asis UNHEX(SHA1("topsecret"))', | ||
'CreatedAt'=>'@asis NOW()', | ||
'ExpiresAt'=>'@asis DATE_ADD(CreatedAt, INTERVAL 10 DAY)' | ||
]); | ||
|
||
return $user_id; | ||
}); | ||
|
||
$I->amConnectedToDb('Secondary'); | ||
codecept_debug( | ||
$I->getFromDb('DemoWarehouse.Audit', ['OrganisationID'=>1]) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters