From 1e7cefc27350f62169f1130f7790cebba651680e Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Tue, 21 Aug 2018 15:36:10 -0500 Subject: [PATCH] initial add of Tag json files ref #65 --- .travis.yml | 2 +- FilterLists.sln | 2 ++ data/FilterListTag.json | 6 ++++++ data/Tag.json | 7 +++++++ .../Seed/Extensions/SeedFilterListsDbContext.cs | 2 ++ 5 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 data/FilterListTag.json create mode 100644 data/Tag.json diff --git a/.travis.yml b/.travis.yml index 498a6e25a..3b9b9a410 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ dist: trusty language: csharp mono: none -dotnet: 2.1.400 +dotnet: 2.1.401 solution: FilterLists.sln addons: apt: diff --git a/FilterLists.sln b/FilterLists.sln index d28aa3b26..f4b1633cd 100644 --- a/FilterLists.sln +++ b/FilterLists.sln @@ -15,6 +15,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "data", "data", "{8C3C7C63-F data\FilterList.json = data\FilterList.json data\FilterListLanguage.json = data\FilterListLanguage.json data\FilterListMaintainer.json = data\FilterListMaintainer.json + data\FilterListTag.json = data\FilterListTag.json data\Fork.json = data\Fork.json data\Language.json = data\Language.json data\License.json = data\License.json @@ -24,6 +25,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "data", "data", "{8C3C7C63-F data\Software.json = data\Software.json data\SoftwareSyntax.json = data\SoftwareSyntax.json data\Syntax.json = data\Syntax.json + data\Tag.json = data\Tag.json EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{FCA7F77A-9EC6-4C6D-A80E-7DD27FF95673}" diff --git a/data/FilterListTag.json b/data/FilterListTag.json new file mode 100644 index 000000000..eff1455dd --- /dev/null +++ b/data/FilterListTag.json @@ -0,0 +1,6 @@ +[ + { + "filterListId": 19, + "tagId": 1 + } +] \ No newline at end of file diff --git a/data/Tag.json b/data/Tag.json new file mode 100644 index 000000000..775762e9b --- /dev/null +++ b/data/Tag.json @@ -0,0 +1,7 @@ +[ + { + "id": 1, + "name": "crypto", + "description": "Blocks cryptomining and/or cryptojacking" + } +] \ No newline at end of file diff --git a/src/FilterLists.Data/Seed/Extensions/SeedFilterListsDbContext.cs b/src/FilterLists.Data/Seed/Extensions/SeedFilterListsDbContext.cs index e027f31fb..06458bd35 100644 --- a/src/FilterLists.Data/Seed/Extensions/SeedFilterListsDbContext.cs +++ b/src/FilterLists.Data/Seed/Extensions/SeedFilterListsDbContext.cs @@ -19,9 +19,11 @@ public static void SeedOrUpdate(this FilterListsDbContext dbContext, string data dbContext.InsertOnDuplicateKeyUpdate(dataPath); dbContext.InsertOnDuplicateKeyUpdate(dataPath); dbContext.InsertOnDuplicateKeyUpdate(dataPath); + dbContext.InsertOnDuplicateKeyUpdate(dataPath); dbContext.InsertOnDuplicateKeyUpdate(dataPath); dbContext.InsertOnDuplicateKeyUpdate(dataPath); dbContext.InsertOnDuplicateKeyUpdate(dataPath); + dbContext.InsertOnDuplicateKeyUpdate(dataPath); dbContext.InsertOnDuplicateKeyUpdate(dataPath); dbContext.InsertOnDuplicateKeyUpdate(dataPath); dbContext.InsertOnDuplicateKeyUpdate(dataPath);