Skip to content

Commit d8c6550

Browse files
committed
Updated scripts to use proper name of project
1 parent a3a87a6 commit d8c6550

7 files changed

+72
-72
lines changed

Diff for: FrameWork/Extensions.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ public static void AddRange<T>(this ICollection<T> target, IEnumerable<T> source
1313
{
1414
if (target == null)
1515
{
16-
throw new ArgumentNullException("target");
16+
throw new ArgumentNullException(nameof(target));
1717
}
1818
if (source == null)
1919
{
20-
throw new ArgumentNullException("source");
20+
throw new ArgumentNullException(nameof(source));
2121
}
2222
foreach (var element in source)
2323
{

Diff for: MyHome.Persistence/AccountingDataContext.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace MyHome.Persistence
88
{
99
public class AccountingDataContext : DbContext
1010
{
11-
public const string ConnectionString = @"Server=.;Database=MyHome2013;User Id=home_user;Password=homeuser;";
11+
public const string ConnectionString = @"Server=.;Database=MyHome;User Id=home_user;Password=homeuser;";
1212

1313
public AccountingDataContext() : base(ConnectionString)
1414
{

Diff for: MyHome.Persistence/Scripts/01_CreateDatabase.sql

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ USE master;
22
GO
33

44
IF EXISTS(SELECT * FROM sys.databases WHERE name = '')
5-
DROP DATABASE MyHome2013;
5+
DROP DATABASE MyHome;
66

7-
CREATE DATABASE MyHome2013;
7+
CREATE DATABASE MyHome;
-8 Bytes
Binary file not shown.

Diff for: MyHome.Persistence/Scripts/03_CreateTables.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
USE MyHome2013;
1+
USE MyHome;
22
GO
33

44
IF OBJECT_ID('Accounting.PaymentMethod', 'U') IS NOT NULL

Diff for: Sql Files/DatabaseCreation-SQLServer.sql

13 KB
Binary file not shown.

Diff for: Sql Files/DatabaseCreation.sql

+66-66
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,28 @@ SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
22
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
33
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
44

5-
DROP SCHEMA IF EXISTS `myhome2013` ;
6-
CREATE SCHEMA IF NOT EXISTS `myhome2013` DEFAULT CHARACTER SET utf8 ;
7-
USE `myhome2013` ;
5+
DROP SCHEMA IF EXISTS `myhome` ;
6+
CREATE SCHEMA IF NOT EXISTS `myhome` DEFAULT CHARACTER SET utf8 ;
7+
USE `myhome` ;
88

99
-- -----------------------------------------------------
10-
-- Table `myhome2013`.`categoryview`
10+
-- Table `myhome`.`categoryview`
1111
-- -----------------------------------------------------
12-
DROP TABLE IF EXISTS `myhome2013`.`categoryview` ;
12+
DROP TABLE IF EXISTS `myhome`.`categoryview` ;
1313

14-
CREATE TABLE IF NOT EXISTS `myhome2013`.`categoryview` (
14+
CREATE TABLE IF NOT EXISTS `myhome`.`categoryview` (
1515
`KEY` VARCHAR(45) NOT NULL,
1616
`VALUE` VARCHAR(45) NOT NULL)
1717
ENGINE = InnoDB
1818
DEFAULT CHARACTER SET = utf8;
1919

2020

2121
-- -----------------------------------------------------
22-
-- Table `myhome2013`.`t_expenses_category`
22+
-- Table `myhome`.`t_expenses_category`
2323
-- -----------------------------------------------------
24-
DROP TABLE IF EXISTS `myhome2013`.`t_expenses_category` ;
24+
DROP TABLE IF EXISTS `myhome`.`t_expenses_category` ;
2525

26-
CREATE TABLE IF NOT EXISTS `myhome2013`.`t_expenses_category` (
26+
CREATE TABLE IF NOT EXISTS `myhome`.`t_expenses_category` (
2727
`ID` INT(11) NOT NULL,
2828
`NAME` VARCHAR(45) NOT NULL,
2929
PRIMARY KEY (`ID`))
@@ -32,11 +32,11 @@ AUTO_INCREMENT = 16;
3232

3333

3434
-- -----------------------------------------------------
35-
-- Table `myhome2013`.`t_payment_methods`
35+
-- Table `myhome`.`t_payment_methods`
3636
-- -----------------------------------------------------
37-
DROP TABLE IF EXISTS `myhome2013`.`t_payment_methods` ;
37+
DROP TABLE IF EXISTS `myhome`.`t_payment_methods` ;
3838

39-
CREATE TABLE IF NOT EXISTS `myhome2013`.`t_payment_methods` (
39+
CREATE TABLE IF NOT EXISTS `myhome`.`t_payment_methods` (
4040
`ID` INT(11) NOT NULL,
4141
`NAME` VARCHAR(45) NOT NULL,
4242
PRIMARY KEY (`ID`))
@@ -45,11 +45,11 @@ AUTO_INCREMENT = 11;
4545

4646

4747
-- -----------------------------------------------------
48-
-- Table `myhome2013`.`t_expenses`
48+
-- Table `myhome`.`t_expenses`
4949
-- -----------------------------------------------------
50-
DROP TABLE IF EXISTS `myhome2013`.`t_expenses` ;
50+
DROP TABLE IF EXISTS `myhome`.`t_expenses` ;
5151

52-
CREATE TABLE IF NOT EXISTS `myhome2013`.`t_expenses` (
52+
CREATE TABLE IF NOT EXISTS `myhome`.`t_expenses` (
5353
`ID` INT(10) NOT NULL,
5454
`AMOUNT` DOUBLE NOT NULL,
5555
`EXP_DATE` DATETIME NULL DEFAULT NULL,
@@ -61,12 +61,12 @@ CREATE TABLE IF NOT EXISTS `myhome2013`.`t_expenses` (
6161
INDEX `CATEGORY_NAME_idx` (`CATEGORY` ASC),
6262
CONSTRAINT `EXP_CATEGORY_NAME`
6363
FOREIGN KEY (`CATEGORY`)
64-
REFERENCES `myhome2013`.`t_expenses_category` (`ID`)
64+
REFERENCES `myhome`.`t_expenses_category` (`ID`)
6565
ON DELETE CASCADE
6666
ON UPDATE CASCADE,
6767
CONSTRAINT `EXP_PAYMENT_METHOD`
6868
FOREIGN KEY (`METHOD`)
69-
REFERENCES `myhome2013`.`t_payment_methods` (`ID`)
69+
REFERENCES `myhome`.`t_payment_methods` (`ID`)
7070
ON DELETE CASCADE
7171
ON UPDATE CASCADE)
7272
ENGINE = InnoDB
@@ -75,23 +75,23 @@ COMMENT = ' ';
7575

7676

7777
-- -----------------------------------------------------
78-
-- Table `myhome2013`.`t_incomes_category`
78+
-- Table `myhome`.`t_incomes_category`
7979
-- -----------------------------------------------------
80-
DROP TABLE IF EXISTS `myhome2013`.`t_incomes_category` ;
80+
DROP TABLE IF EXISTS `myhome`.`t_incomes_category` ;
8181

82-
CREATE TABLE IF NOT EXISTS `myhome2013`.`t_incomes_category` (
82+
CREATE TABLE IF NOT EXISTS `myhome`.`t_incomes_category` (
8383
`ID` INT(10) NOT NULL,
8484
`NAME` VARCHAR(45) NOT NULL,
8585
PRIMARY KEY (`ID`))
8686
ENGINE = InnoDB;
8787

8888

8989
-- -----------------------------------------------------
90-
-- Table `myhome2013`.`t_incomes`
90+
-- Table `myhome`.`t_incomes`
9191
-- -----------------------------------------------------
92-
DROP TABLE IF EXISTS `myhome2013`.`t_incomes` ;
92+
DROP TABLE IF EXISTS `myhome`.`t_incomes` ;
9393

94-
CREATE TABLE IF NOT EXISTS `myhome2013`.`t_incomes` (
94+
CREATE TABLE IF NOT EXISTS `myhome`.`t_incomes` (
9595
`ID` INT(10) NOT NULL,
9696
`AMOUNT` DOUBLE NOT NULL,
9797
`INC_DATE` DATETIME NULL DEFAULT NULL,
@@ -103,39 +103,39 @@ CREATE TABLE IF NOT EXISTS `myhome2013`.`t_incomes` (
103103
INDEX `PAYMENT_METHOD_idx` (`METHOD` ASC),
104104
CONSTRAINT `INC_CATEGORY_NAME`
105105
FOREIGN KEY (`CATEGORY`)
106-
REFERENCES `myhome2013`.`t_incomes_category` (`ID`)
106+
REFERENCES `myhome`.`t_incomes_category` (`ID`)
107107
ON DELETE CASCADE
108108
ON UPDATE CASCADE,
109109
CONSTRAINT `INC_PAYMENT_METHOD`
110110
FOREIGN KEY (`METHOD`)
111-
REFERENCES `myhome2013`.`t_payment_methods` (`ID`)
111+
REFERENCES `myhome`.`t_payment_methods` (`ID`)
112112
ON DELETE CASCADE
113113
ON UPDATE CASCADE)
114114
ENGINE = InnoDB
115115
AUTO_INCREMENT = 15;
116116

117-
USE `myhome2013` ;
117+
USE `myhome` ;
118118

119119
-- -----------------------------------------------------
120-
-- Placeholder table for view `myhome2013`.`viw`
120+
-- Placeholder table for view `myhome`.`viw`
121121
-- -----------------------------------------------------
122-
CREATE TABLE IF NOT EXISTS `myhome2013`.`viw` (`Entity id` INT, `Expense date` INT, `Amount` INT, `Category` INT, `Payment Method` INT, `Comments` INT);
122+
CREATE TABLE IF NOT EXISTS `myhome`.`viw` (`Entity id` INT, `Expense date` INT, `Amount` INT, `Category` INT, `Payment Method` INT, `Comments` INT);
123123

124124
-- -----------------------------------------------------
125-
-- Placeholder table for view `myhome2013`.`viwin`
125+
-- Placeholder table for view `myhome`.`viwin`
126126
-- -----------------------------------------------------
127-
CREATE TABLE IF NOT EXISTS `myhome2013`.`viwin` (`Income Date` INT, `Amount` INT, `Category` INT, `Payment Method` INT, `Comments` INT);
127+
CREATE TABLE IF NOT EXISTS `myhome`.`viwin` (`Income Date` INT, `Amount` INT, `Category` INT, `Payment Method` INT, `Comments` INT);
128128

129129
-- -----------------------------------------------------
130130
-- function new_expense_id
131131
-- -----------------------------------------------------
132132

133-
USE `myhome2013`;
134-
DROP function IF EXISTS `myhome2013`.`new_expense_id`;
133+
USE `myhome`;
134+
DROP function IF EXISTS `myhome`.`new_expense_id`;
135135

136136
DELIMITER $$
137-
USE `myhome2013`$$
138-
CREATE DEFINER=`MyHome2013`@`%` FUNCTION `new_expense_id`() RETURNS int(11)
137+
USE `myhome`$$
138+
CREATE DEFINER=`myhome`@`%` FUNCTION `new_expense_id`() RETURNS int(11)
139139
BEGIN
140140
declare newId int;
141141
set newId = (select last_insert_id() from t_expenses);
@@ -154,12 +154,12 @@ DELIMITER ;
154154
-- function new_expenses_category_id
155155
-- -----------------------------------------------------
156156

157-
USE `myhome2013`;
158-
DROP function IF EXISTS `myhome2013`.`new_expenses_category_id`;
157+
USE `myhome`;
158+
DROP function IF EXISTS `myhome`.`new_expenses_category_id`;
159159

160160
DELIMITER $$
161-
USE `myhome2013`$$
162-
CREATE DEFINER=`MyHome2013`@`%` FUNCTION `new_expenses_category_id`() RETURNS int(11)
161+
USE `myhome`$$
162+
CREATE DEFINER=`myhome`@`%` FUNCTION `new_expenses_category_id`() RETURNS int(11)
163163
BEGIN
164164
declare newId int;
165165
set newId = (select last_insert_id() from t_expenses_category);
@@ -177,12 +177,12 @@ DELIMITER ;
177177
-- function new_income_category_id
178178
-- -----------------------------------------------------
179179

180-
USE `myhome2013`;
181-
DROP function IF EXISTS `myhome2013`.`new_income_category_id`;
180+
USE `myhome`;
181+
DROP function IF EXISTS `myhome`.`new_income_category_id`;
182182

183183
DELIMITER $$
184-
USE `myhome2013`$$
185-
CREATE DEFINER=`MyHome2013`@`%` FUNCTION `new_income_category_id`() RETURNS int(11)
184+
USE `myhome`$$
185+
CREATE DEFINER=`myhome`@`%` FUNCTION `new_income_category_id`() RETURNS int(11)
186186
BEGIN
187187
declare newId int;
188188
set newId = (select last_insert_id() from t_incomes_category);
@@ -200,12 +200,12 @@ DELIMITER ;
200200
-- function new_income_id
201201
-- -----------------------------------------------------
202202

203-
USE `myhome2013`;
204-
DROP function IF EXISTS `myhome2013`.`new_income_id`;
203+
USE `myhome`;
204+
DROP function IF EXISTS `myhome`.`new_income_id`;
205205

206206
DELIMITER $$
207-
USE `myhome2013`$$
208-
CREATE DEFINER=`MyHome2013`@`%` FUNCTION `new_income_id`() RETURNS int(11)
207+
USE `myhome`$$
208+
CREATE DEFINER=`myhome`@`%` FUNCTION `new_income_id`() RETURNS int(11)
209209
BEGIN
210210
declare newId int;
211211
set newId = (select last_insert_id() from t_incomes);
@@ -223,12 +223,12 @@ DELIMITER ;
223223
-- function new_payment_method_id
224224
-- -----------------------------------------------------
225225

226-
USE `myhome2013`;
227-
DROP function IF EXISTS `myhome2013`.`new_payment_method_id`;
226+
USE `myhome`;
227+
DROP function IF EXISTS `myhome`.`new_payment_method_id`;
228228

229229
DELIMITER $$
230-
USE `myhome2013`$$
231-
CREATE DEFINER=`MyHome2013`@`%` FUNCTION `new_payment_method_id`() RETURNS int(11)
230+
USE `myhome`$$
231+
CREATE DEFINER=`myhome`@`%` FUNCTION `new_payment_method_id`() RETURNS int(11)
232232
BEGIN
233233
declare newId int;
234234
set newId = (select last_insert_id() from t_payment_methods);
@@ -243,16 +243,16 @@ END$$
243243
DELIMITER ;
244244

245245
-- -----------------------------------------------------
246-
-- View `myhome2013`.`viw`
246+
-- View `myhome`.`viw`
247247
-- -----------------------------------------------------
248-
DROP VIEW IF EXISTS `myhome2013`.`viw` ;
249-
DROP TABLE IF EXISTS `myhome2013`.`viw`;
250-
USE `myhome2013`;
248+
DROP VIEW IF EXISTS `myhome`.`viw` ;
249+
DROP TABLE IF EXISTS `myhome`.`viw`;
250+
USE `myhome`;
251251
CREATE OR REPLACE
252252
ALGORITHM = UNDEFINED
253253
DEFINER = `root`@`localhost`
254254
SQL SECURITY DEFINER
255-
VIEW `myhome2013`.`viw` AS
255+
VIEW `myhome`.`viw` AS
256256
select
257257
`ex`.`ID` AS `Entity id`,
258258
`ex`.`EXP_DATE` AS `Expense date`,
@@ -261,34 +261,34 @@ VIEW `myhome2013`.`viw` AS
261261
`pay`.`NAME` AS `Payment Method`,
262262
`ex`.`COMMENTS` AS `Comments`
263263
from
264-
((`myhome2013`.`t_expenses` `ex`
265-
join `myhome2013`.`t_expenses_category` `excat`)
266-
join `myhome2013`.`t_payment_methods` `pay`)
264+
((`myhome`.`t_expenses` `ex`
265+
join `myhome`.`t_expenses_category` `excat`)
266+
join `myhome`.`t_payment_methods` `pay`)
267267
where
268268
((`excat`.`ID` = `ex`.`CATEGORY`)
269269
and (`pay`.`ID` = `ex`.`METHOD`));
270270

271271
-- -----------------------------------------------------
272-
-- View `myhome2013`.`viwin`
272+
-- View `myhome`.`viwin`
273273
-- -----------------------------------------------------
274-
DROP VIEW IF EXISTS `myhome2013`.`viwin` ;
275-
DROP TABLE IF EXISTS `myhome2013`.`viwin`;
276-
USE `myhome2013`;
274+
DROP VIEW IF EXISTS `myhome`.`viwin` ;
275+
DROP TABLE IF EXISTS `myhome`.`viwin`;
276+
USE `myhome`;
277277
CREATE OR REPLACE
278278
ALGORITHM = UNDEFINED
279279
DEFINER = `root`@`localhost`
280280
SQL SECURITY DEFINER
281-
VIEW `myhome2013`.`viwin` AS
281+
VIEW `myhome`.`viwin` AS
282282
select
283283
`inc`.`INC_DATE` AS `Income Date`,
284284
`inc`.`AMOUNT` AS `Amount`,
285285
`inccat`.`NAME` AS `Category`,
286286
`pay`.`NAME` AS `Payment Method`,
287287
`inc`.`COMMENTS` AS `Comments`
288288
from
289-
((`myhome2013`.`t_incomes` `inc`
290-
join `myhome2013`.`t_incomes_category` `inccat`)
291-
join `myhome2013`.`t_payment_methods` `pay`)
289+
((`myhome`.`t_incomes` `inc`
290+
join `myhome`.`t_incomes_category` `inccat`)
291+
join `myhome`.`t_payment_methods` `pay`)
292292
where
293293
((`inccat`.`ID` = `inc`.`CATEGORY`)
294294
and (`pay`.`ID` = `inc`.`METHOD`));

0 commit comments

Comments
 (0)