Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
209 commits
Select commit Hold shift + click to select a range
07697fb
added comments for funnel2.0 user story
technolefty Apr 2, 2020
10d697d
working on checkmarks
Apr 2, 2020
b43478e
first attempt, getting unknown column submit_count in field list
isabelladeleon12 Apr 4, 2020
6e2c56c
batch buzzsumo fetch / insert to db
technolefty Apr 8, 2020
405e0b5
adjustment to sql add field to INSERT, check for null in controller
technolefty Apr 8, 2020
c8e1228
adding back a-users
technolefty Apr 8, 2020
4f458ef
peclient - checkall and bulk status update framework
technolefty Apr 8, 2020
ac70f27
the filter goes back to all articles
Apr 8, 2020
d0094be
login and router
technolefty Apr 9, 2020
2b49eff
Build empty docker volume just containing peclient/dist files at /var…
normangilmore Apr 9, 2020
6c02552
Change Dockerfile so it can run as a container. But still just using …
normangilmore Apr 9, 2020
7b3ac09
Put static files at /var/www/staticfiles, not /var/www/staticfiles/pe…
normangilmore Apr 10, 2020
4b056f2
minor changes to submit bulk button
Apr 11, 2020
3bf3031
fixed All filter bug, working on popularity filter
Apr 12, 2020
f582d46
done w popularity filter
Apr 12, 2020
27eda31
ChromeExtension1.0: Create function to check if an article has alread…
drew-chen Apr 5, 2020
b525e4c
ChromeExtension1.0: Change to verification to use callback to avoid u…
drew-chen Apr 5, 2020
0935d48
ChromeExtension1.0: Popup visualizes verification. Begin the same wit…
drew-chen Apr 6, 2020
d3ad239
Start refactor to divide logic among 3 javascript files
drew-chen Apr 12, 2020
adea294
ChromeExtension1.0: Icon now previews whether an article has been vetted
drew-chen Apr 13, 2020
6a778d6
Resolve merge conflicts
drew-chen Apr 13, 2020
93b0b1b
ChromeExtension1.0: Reduce code redundancy and call verifyAudit at be…
drew-chen Apr 13, 2020
eb4cbb4
Clean up code and images organization, and update readme
drew-chen Apr 13, 2020
0930e8c
ChromeExtension1.0: Remove content script that is unneeded for now
drew-chen Apr 13, 2020
e701126
added aws-amplify and aws-amplify-angular node packages
technolefty Apr 13, 2020
0594288
added filename field
technolefty Apr 14, 2020
57743cf
hallmark and text coordinated, colors fixed
AndyFlury13 Apr 5, 2020
a515a17
Color bug fixed
AndyFlury13 Apr 6, 2020
211eeb6
Hallmark and article linked, color fixed
AndyFlury13 Apr 6, 2020
060cda7
Cosmetic touch ups
AndyFlury13 Apr 14, 2020
1c1444a
ChromeExtension1.0: Fix broken logo
drew-chen Apr 14, 2020
a888521
send to s3: installed awscli locally, configured secret keys, added a…
technolefty Apr 15, 2020
f439e92
push to s3 via py script.
technolefty Apr 15, 2020
0bb7a94
front: add utilities and menu;. back: return descriptive on s3 and buzz
technolefty Apr 16, 2020
2f58fb5
minor fixes to highighlights
theresac23 Apr 16, 2020
d0a9103
minor fixes to highlights
theresac23 Apr 16, 2020
66389b3
merge from funnel1.0
technolefty Apr 16, 2020
a5ce92a
merging branch funnel1.0
technolefty Apr 16, 2020
18ec13b
Newsfeed styling
davidmwei Apr 17, 2020
87782e9
More styling for newsfeed
davidmwei Apr 18, 2020
64855e5
Visualization shows score now
AndyFlury13 Apr 18, 2020
35321a7
Newsfeed hallmark updated
AndyFlury13 Apr 18, 2020
8b5eb60
ChromeExtension1.0: Update readme and fix audit detection on window c…
drew-chen Apr 19, 2020
7457147
added ordering functionality to newsfeed
theresac23 Apr 19, 2020
3523c88
auth
technolefty Apr 20, 2020
34fdd7d
remove dev setting - which does not perform auth
technolefty Apr 20, 2020
c9c0401
display results of utility calls (buzz, s3)
technolefty Apr 20, 2020
d01c609
merge funnel1.0
technolefty Apr 20, 2020
c1c988d
remove a-users.sql
technolefty Apr 20, 2020
9bdd792
adding back filename field from deleted a-users.sql
technolefty Apr 20, 2020
0b04871
Also need to delete a-users.sql references from init_db.sh.
normangilmore Apr 21, 2020
694a61d
buzz query and s3 destination
technolefty Apr 21, 2020
f618f68
Merge branch 'master' of https://github.com/Goodly/software-dev
technolefty Apr 21, 2020
859cd9a
Hallmark width changed, leaf nodes combined
AndyFlury13 Apr 22, 2020
d51d44c
fixed status changes and bulk submit
Apr 22, 2020
c346073
added id tracking attribute to highlights
theresac23 Apr 22, 2020
e978400
removing unneeded files
technolefty Apr 22, 2020
e49e2a1
Merge branch 'master' of https://github.com/Goodly/software-dev
technolefty Apr 22, 2020
836bd2a
add articletext to dashboard table: div, linebreaks, max-height 300, …
technolefty Apr 23, 2020
eb0f866
line ends, filenames
technolefty Apr 23, 2020
6462138
environment variables for s3 destination and prefix
technolefty Apr 23, 2020
4be38ec
merge with master
technolefty Apr 23, 2020
8d15e40
merge
technolefty Apr 23, 2020
fc0bbf0
tracking multiple ids within highlights
theresac23 Apr 23, 2020
c001afe
updating highlights
theresac23 Apr 23, 2020
000226f
publishedDate
technolefty Apr 23, 2020
735a44a
Hallmark highlight shows multiple fallacies
AndyFlury13 Apr 26, 2020
a22e2d6
environment_flag - DEV = development, not DEV = prod
technolefty Apr 27, 2020
d5942c6
Merge branch 'master' of https://github.com/Goodly/software-dev
technolefty Apr 27, 2020
5ef12d0
filenames to s3 and development environment settings
technolefty Apr 27, 2020
5eeb94b
ChromeExtension1.0: Switch to local server for development purposes
drew-chen Apr 28, 2020
fd2e9f5
ChromeExtension1.0: Remove temporary functions
drew-chen Apr 28, 2020
701bb8e
filenames inside tgz, win scrape.py, article word count max, dev env …
technolefty Apr 29, 2020
697f9a4
Merge branch 'master' of https://github.com/Goodly/software-dev
technolefty Apr 29, 2020
e10c044
s3 dest filenames, win vs linux filename preparation, s3-put.py now a…
technolefty Apr 29, 2020
467f1e8
dev changes to the docker build
technolefty Apr 30, 2020
fe052b8
Add maven build steps back to Dockerfile. Optimized build speed by by…
normangilmore May 1, 2020
f585de0
Add alias 'npm run deploy' to mean 'ng build --configuration=production'
normangilmore May 1, 2020
71bd535
change [value]='all' to ='null' dashboard html; resolves compile erro…
technolefty May 1, 2020
b085138
Merge branch 'master' of https://github.com/Goodly/software-dev
technolefty May 1, 2020
784b947
DEV flag value and s3-put display message
technolefty May 2, 2020
4ca2d10
merge main branch to 1.1
technolefty May 2, 2020
289803c
fix published_date and publish_date to be set to the same value from …
technolefty May 2, 2020
2c75594
article status to SENT; buzzJob status table on utility page; db migr…
technolefty May 4, 2020
4f39f64
Dockerfile-mysql now copies everything, including migration scripts, …
normangilmore May 4, 2020
b63561d
s3 job realtime update in utility page
technolefty May 4, 2020
b04562c
order articles by date added desc, s3 and buzz job tweaks
technolefty May 4, 2020
c3b0cce
Copy database scripts and SQL into main container to aid migrations.
normangilmore May 5, 2020
446feab
For reals: Install MariaDB (MySQL compatible) client for use in manua…
normangilmore May 6, 2020
aa3f59f
Visualizations: Revise scoreArticle function to take textFileUrl para…
normangilmore May 6, 2020
53189b1
Visualizations: Rename testHighlights.html to Visualization.html to m…
normangilmore May 6, 2020
00ef3f5
Remove cors-anywhere workaround from newsfeed Javascript code.
normangilmore May 14, 2020
732ecef
Fix script src in newsfeed.html so dataConverter.js loads.
normangilmore May 14, 2020
e3d2904
Add latest test data for newsfeed. Update visData.json to match.
normangilmore May 16, 2020
d49b6df
fixed single-line highlight bug
theresac23 May 17, 2020
490a4e6
workon
technolefty May 21, 2020
e9803da
db migration for article tags
technolefty May 30, 2020
c619714
changing api endpoint to docker container isntead of local jre
technolefty Jun 9, 2020
56c053b
merging funnel1.1 branch
technolefty Jun 9, 2020
73dcf57
merging funnel2.0
technolefty Jun 9, 2020
0f2e5b9
commented out lines to get dashboard working
isabelladeleon12 Jun 10, 2020
e59087c
adding config change
isabelladeleon12 Jun 10, 2020
eba556b
Merge branch 'query-and-article-tags' of https://github.com/Goodly/so…
isabelladeleon12 Jun 10, 2020
b561f4d
resolve merge conflict
technolefty Jun 10, 2020
a6d3b41
merged article update (1.1)
isabelladeleon12 Jun 11, 2020
c919fd6
Merge branch 'query-and-article-tags' of https://github.com/Goodly/so…
isabelladeleon12 Jun 11, 2020
2ec72d3
merging from alpha-s3-filename
technolefty Jun 11, 2020
704277d
all = null
Jun 12, 2020
f431d7d
Merge branch 'query-and-article-tags' of https://github.com/Goodly/so…
Jun 12, 2020
b16adc5
popular html fix
Jun 12, 2020
c0c6986
Added Update Metrics status bar (UpdateJob)
isabelladeleon12 Jun 18, 2020
07ecf86
Merge branch 'query-and-article-tags' of https://github.com/Goodly/so…
isabelladeleon12 Jun 18, 2020
308382a
tags header
Jun 18, 2020
fb707cb
tags column
Jun 26, 2020
af3d519
buzz queries
technolefty Jun 26, 2020
05c0227
added tag page to peclient
technolefty Jun 26, 2020
340b428
show query string for running bozz job
technolefty Jun 26, 2020
bb32580
Merge remote-tracking branch 'origin/query-and-article-tags'
normangilmore Jun 28, 2020
2f576b9
Install full mysql-client in Article Funnel container so that mysqldu…
normangilmore Jun 28, 2020
eae5fef
Added tag controller + AddTag, GetTags, DeleteTag
isabelladeleon12 Jun 29, 2020
8aedbe4
Update Article Funnel database init script to include CREATE VIEW, SH…
normangilmore Jun 29, 2020
1404f32
Merge remote-tracking branch 'origin/query-and-article-tags'
normangilmore Jun 29, 2020
c28aa81
fix path manage-tags and add db migration
technolefty Jun 30, 2020
7a9f542
address java nullpointer in article service when iterating through us…
technolefty Jul 1, 2020
3830034
clean up TagController, add delete/post/add methods
isabelladeleon12 Jul 3, 2020
883ccc7
Merge branch 'query-and-article-tags' of https://github.com/Goodly/so…
isabelladeleon12 Jul 3, 2020
0545c7f
Added check if tag already exists before adding
isabelladeleon12 Jul 3, 2020
f767c63
minor changes to tags
Jul 7, 2020
37bc996
manage tags page
Jul 7, 2020
62f941a
add, delete, and get tags added to manage tags
Jul 7, 2020
a2c354c
adjustments to client and server POST and DELETE methods
technolefty Jul 10, 2020
26c5fbd
service post and delete methods not to use ? name value pairs
technolefty Jul 10, 2020
39d4557
updates managed tags
Jul 16, 2020
9fb7047
add trailing slash after articleFilenameTag
technolefty Jul 22, 2020
885d6bd
Add and Remove from article-has-tag
isabelladeleon12 Jul 24, 2020
e94b7e1
Merge branch 'query-and-article-tags' of https://github.com/Goodly/so…
isabelladeleon12 Jul 24, 2020
711a4be
Added ability to add tags to query + have tags loaded onto articles u…
isabelladeleon12 Jul 30, 2020
771b5da
progress on the typeahead, also preparation to delete tags from articles
Aug 9, 2020
f01f541
added Add tag bar
Aug 9, 2020
7e7d9d2
Added pagination for dashboard table
isabelladeleon12 Aug 18, 2020
e502ee2
merge
isabelladeleon12 Aug 18, 2020
53bade5
got the tag delete feature working, still working on adding adds with…
Aug 21, 2020
7bb2f1d
add/delete tags work, working on a bug where new tags aren't being cr…
Aug 21, 2020
8a913d4
fixed bug in tag search
Aug 21, 2020
2362085
bug fixes for add/delete tags from articles
Aug 23, 2020
5996c5a
testing for tag delete bug
Sep 4, 2020
7a2f97a
add and delete tags feature working
Sep 5, 2020
253b535
setup for tag query
Sep 6, 2020
4ca6bbe
evergreen covid query
technolefty Sep 10, 2020
cda5249
Merge branch 'query-and-article-tags' of https://github.com/Goodly/so…
technolefty Sep 10, 2020
55f82fb
evergreen covid query
technolefty Sep 10, 2020
c9f5d43
update to buzz-query
technolefty Sep 10, 2020
f268a2e
some code to add tags to queries
Sep 17, 2020
2b78f60
minor changes
Sep 24, 2020
501033c
chrome xtension
technolefty Sep 25, 2020
58fef20
adding https:// to api calls
technolefty Sep 30, 2020
3099284
Merge branch 'query-and-article-tags' of https://github.com/Goodly/so…
technolefty Sep 30, 2020
6365cbc
further field expansion for article filename tag
technolefty Sep 30, 2020
7b24ba4
evergreen / expand filenametag field / add https:// in api call
technolefty Sep 30, 2020
7892e04
added delete method to buzzquerycontroller and buzzqueryservice
Oct 1, 2020
b47094f
obfuscate api key
technolefty Oct 1, 2020
153c9c4
Merge branch 'query-and-article-tags' of https://github.com/Goodly/so…
Oct 1, 2020
d4478fd
obfuscate api key; add covid2 query
technolefty Oct 2, 2020
dabdc27
db migration for covid2
technolefty Oct 2, 2020
8aeb763
delete %evergreen% publish_date > 2020-05-05 and rename filename_tag …
technolefty Oct 3, 2020
102d579
allow return of 75 covid2 articles instead of 25
technolefty Oct 3, 2020
9098962
minor change
Oct 9, 2020
ac37f6b
bug for tag search
Oct 9, 2020
1d87283
changes
Oct 15, 2020
8e1ebd1
Merge branch 'evergreen' into query-and-article-tags
technolefty Oct 15, 2020
7b4f89a
Merge branch 'query-and-article-tags' of https://github.com/Goodly/so…
technolefty Oct 15, 2020
a0998ad
fixed as much as I can for utilities, still working on the tag search…
Oct 16, 2020
569f394
tag search working, found a submitbulk bug
Oct 16, 2020
48765a7
no real changes
Oct 22, 2020
c49beb5
debug query addtag and deletetag
technolefty Oct 22, 2020
c48aa57
search articles by tag
technolefty Oct 24, 2020
6286e26
syntax error in utilities component
technolefty Oct 24, 2020
64ff9df
added naive resource based pagination in ArticleController
Oct 29, 2020
9e890d8
commented out pagination compile time errors
Nov 4, 2020
c3cb8c2
changes to frondend
Nov 4, 2020
4569ed5
style things
Nov 4, 2020
ba4100c
chrome extension and tag search bug correction
technolefty Nov 5, 2020
9f86897
bug fixes article?tag= and chrome extension manifest
technolefty Nov 12, 2020
2139a9e
implemented simple pagination with query parameters
Nov 12, 2020
4633518
Merge branch 'query-and-article-tags' of https://github.com/Goodly/so…
Nov 12, 2020
d8dc964
finished article pagination with sort order for date, url, and title
Nov 19, 2020
8f3e5de
implemented article function that fetches total number of pages
Dec 3, 2020
ebba788
serverside pagination
Dec 3, 2020
f40f2d3
finished implementing most search/filter methods using pagination
Dec 19, 2020
c0181b9
changes, still bugs with checkboxes and statuses
Dec 25, 2020
f20dbd0
some progress
Dec 25, 2020
c00aa6e
still has native sql queries, but attempts to combine sorting with st…
Dec 29, 2020
0ffb767
demonstrate alternate query by article status
technolefty Dec 30, 2020
1946cb3
fixed filter and search by title SQL errors, ready to fix frontend er…
Jan 6, 2021
52ec942
fixing bugs a couple more to go
Jan 10, 2021
0ec9950
bug fixes
Jan 10, 2021
f6b2dbe
angular dependencies update
technolefty Jan 11, 2021
b790634
package updates
technolefty Jan 11, 2021
1a2c603
versions
technolefty Jan 11, 2021
bd5f55a
versions
technolefty Jan 11, 2021
860e1a8
versions
technolefty Jan 11, 2021
25f0568
versions
technolefty Jan 11, 2021
cdf75cf
added tag search to paginate
technolefty Jan 12, 2021
efe249d
fix bug so it works
Jan 21, 2021
0aeac0b
fixed some bugs
Feb 4, 2021
74e8672
flutter app
chrisapton Mar 3, 2021
a0e622e
changed flutter app to different format still working on loading screen
chrisapton May 15, 2021
144b0fe
launch screen ios/android
chrisapton Jun 16, 2021
0297c79
manifest v3
technolefty Mar 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/software-dev.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-- update article set published_date = null where published_date < 1587340800 or published_date > 1589932800;

ALTER TABLE article CHANGE COLUMN published_date published_date timestamp default CURRENT_TIMESTAMP;
ALTER TABLE article CHANGE COLUMN publish_date publish_date timestamp default CURRENT_TIMESTAMP;


DROP TABLE IF EXISTS `buzz_job`;
CREATE TABLE `buzz_job` (
`id` int NOT NULL AUTO_INCREMENT,
`start_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`end_date` timestamp NULL DEFAULT NULL,
`finished` tinyint NOT NULL DEFAULT 0,
`elapsed_seconds` int null default 0,
`query` mediumtext default NULL,
`articles_returned` integer default 0,
`articles_youtube` integer default 0,
`articles_700` integer default 0,
`articles_dropped` integer default 0,
`articles_created` integer default 0,
`articles_updated` integer default 0,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=969 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
DROP TABLE IF EXISTS `s3_job`;
CREATE TABLE `s3_job` (
`id` int NOT NULL AUTO_INCREMENT,
`start_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`finished` tinyint NOT NULL DEFAULT 0,
`elapsed_seconds` int null default 0,
`articles_to_send` integer default 0,
`articles_sent` integer default 0,
`articles` mediumtext default null,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=969 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
DROP TABLE IF EXISTS `tag`;
CREATE TABLE `tag` (
`id` int NOT NULL AUTO_INCREMENT,
`tag` varchar(20) default "",
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

DROP TABLE IF EXISTS `article_has_tag`;
CREATE TABLE `article_has_tag` (
`id` int NOT NULL AUTO_INCREMENT,
`tag_id` int NOT NULL,
`article_id` int NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4543 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

drop view if exists `article_tag_view`;
CREATE VIEW `article_tag_view` AS
select
`t`.`id` as `article_has_tag_id`,
`t`.`tag` AS `tag` ,
`aht`.`article_id` as `article_id`
from
(`article_has_tag` `aht` join `tag` `t`)
where
(`aht`.`tag_id` = `t`.`id`)
order by
`t`.`tag` desc ;

DROP TABLE IF EXISTS `buzz_query`;
CREATE TABLE `buzz_query` (
`id` int NOT NULL AUTO_INCREMENT,
`query` text default null,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4325 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

DROP TABLE IF EXISTS `query_has_tag`;
CREATE TABLE `query_has_tag` (
`id` int NOT NULL AUTO_INCREMENT,
`tag_id` int NOT NULL,
`query_id` int NOT NULL,
`tag` char(50) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2321 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

drop view if exists `query_tag_view`;
CREATE VIEW `query_tag_view` AS
select
`qht`.`id` as `id`,
`t`.`tag` AS `tag` ,
`qht`.`query_id` as `query_id`
from
(`query_has_tag` `qht` join `tag` `t`)
where
(`qht`.`tag_id` = `t`.`id`)
order by
`t`.`tag` desc ;

-- drop view if exists `article_current_status`;
-- drop view if exists `article_sub_status_view`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@

DROP VIEW IF EXISTS `article_status_view`;
CREATE VIEW `article_status_view` AS select `ahs`.`id` AS `id`,`ahs`.`article_id` AS `article_id`,`ahs`.`date_changed` AS `date_changed`,`ahs`.`comment` AS `comment`,`ast`.`status_code` AS `status_code`,`ast`.`status_text` AS `status_text` from (`article_has_status` `ahs` join `article_status` `ast`) where (`ahs`.`article_status_id` = `ast`.`id`) order by `ahs`.`id` desc ;

DROP VIEW IF EXISTS `article_sub_status_view`;
CREATE VIEW `article_sub_status_view` AS select `article_has_status`.`article_id` AS `article_id`,max(`article_has_status`.`date_changed`) AS `MaxDateTime` from `article_has_status` group by `article_has_status`.`article_id`;

DROP VIEW IF EXISTS `article_current_status`;
CREATE VIEW `article_current_status` AS select `a`.`id` AS `id`,`a`.`title` AS `title`,`a`.`author` AS `author`,`a`.`url` AS `url`,`a`.`publish_date` AS `publish_date`,`a`.`article_text` AS `article_text`,`st`.`status_code` AS `status_code` from (((`article` `a` join `article_has_status` `ahs`) join `article_status` `st`) join `article_sub_status_view` `assv`) where ((`ahs`.`article_id` = `assv`.`article_id`) and (`ahs`.`date_changed` = `assv`.`MaxDateTime`) and (`a`.`id` = `assv`.`article_id`) and (`st`.`id` = `ahs`.`article_status_id`)) ;

-- Dump completed on 2020-03-15 17:54:45
-- update article set published_date = null where published_date < 1587340800 or published_date > 1589932800;

ALTER TABLE article CHANGE COLUMN published_date published_date timestamp default CURRENT_TIMESTAMP;
ALTER TABLE article CHANGE COLUMN publish_date publish_date timestamp default CURRENT_TIMESTAMP;


DROP TABLE IF EXISTS `buzz_job`;
CREATE TABLE `buzz_job` (
`id` int NOT NULL AUTO_INCREMENT,
`start_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`end_date` timestamp NULL DEFAULT NULL,
`finished` tinyint NOT NULL DEFAULT 0,
`elapsed_seconds` int null default 0,
`query` mediumtext default NULL,
`articles_returned` integer default 0,
`articles_youtube` integer default 0,
`articles_700` integer default 0,
`articles_dropped` integer default 0,
`articles_created` integer default 0,
`articles_updated` integer default 0,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=969 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

DROP TABLE IF EXISTS `s3_job`;
CREATE TABLE `s3_job` (
`id` int NOT NULL AUTO_INCREMENT,
`start_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`finished` tinyint NOT NULL DEFAULT 0,
`elapsed_seconds` int null default 0,
`articles_to_send` integer default 0,
`articles_sent` integer default 0,
`articles` mediumtext default null,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=969 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

DROP TABLE IF EXISTS `tag`;
CREATE TABLE `tag` (
`id` int NOT NULL AUTO_INCREMENT,
`tag` varchar(20) default "",
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

DROP TABLE IF EXISTS `article_has_tag`;
CREATE TABLE `article_has_tag` (
`id` int NOT NULL AUTO_INCREMENT,
`tag_id` int NOT NULL,
`article_id` int NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4543 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

drop view if exists `article_tag_view`;
CREATE VIEW `article_tag_view` AS
select
`t`.`id` as `article_has_tag_id`,
`t`.`tag` AS `tag` ,
`aht`.`article_id` as `article_id`
from
(`article_has_tag` `aht` join `tag` `t`)
where
(`aht`.`tag_id` = `t`.`id`)
order by
`t`.`tag` desc ;

DROP TABLE IF EXISTS `buzz_query`;
CREATE TABLE `buzz_query` (
`id` int NOT NULL AUTO_INCREMENT,
`query` text default null,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4325 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

DROP TABLE IF EXISTS `query_has_tag`;
CREATE TABLE `query_has_tag` (
`id` int NOT NULL AUTO_INCREMENT,
`tag_id` int NOT NULL,
`query_id` int NOT NULL,
`tag` char(50) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2321 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

drop view if exists `query_tag_view`;
CREATE VIEW `query_tag_view` AS
select
`qht`.`id` as `id`,
`t`.`tag` AS `tag` ,
`qht`.`query_id` as `query_id`
from
(`query_has_tag` `qht` join `tag` `t`)
where
(`qht`.`tag_id` = `t`.`id`)
order by
`t`.`tag` desc ;

-- drop view if exists `article_current_status`;
-- drop view if exists `article_sub_status_view`;

DROP TABLE IF EXISTS `update_job`;
CREATE TABLE `update_job` (
`id` int NOT NULL AUTO_INCREMENT,
`start_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`end_date` timestamp NULL DEFAULT NULL,
`finished` tinyint NOT NULL DEFAULT 0,
`elapsed_seconds` int null default 0,
`articles_buzz` integer default 0,
`articles_user` integer default 0,
`articles_updated` integer default 0,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=969 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;


alter table buzz_query
add column
filename_tag varchar(20) null;

alter table buzz_query
add column
active_flag boolean;

insert into buzz_query
(id, query, filename_tag, active_flag)
values
(1, 'topic=coronavirus,covid&search_type=trending_now&hours=24&count=25&countries=United States', 'CovidArticles',true),
(2, 'topic=Black Lives Matter,BLM&search_type=trending_now&hours=24&count=25&countries=United States', 'BLMArticles',true),
(3, 'topic=Election 2020,US Election,Election&search_type=trending_now&hours=24&count=25&countries=United States', 'ElectionArticles',true)
;

alter table article
add column
filename_tag varchar(20) null;

insert into tag (id, tag) values (1, 'one'), (2, 'two'), (3, 'three');

insert into article_has_tag (id, tag_id, article_id) values (1, 1, 1), (2, 2, 1), (3, 3, 1);

update article set filename_tag = "CovidArticles" where id > 0;

insert into buzz_query
(id, query, filename_tag, active_flag)
values
(4, 'q=covid&num_days=365&result_type=evergreen_score&language=en', 'EvergreenCovidArticles',true);

ALTER TABLE buzz_query CHANGE COLUMN filename_tag filename_tag text;

update buzz_query set filename_tag = 'EvergreenCovidArticles' where filename_tag = 'EvergreenCovidArticl';

update buzz_query set query = 'https://api.buzzsumo.com/search/trends.json?topic=coronavirus,covid&search_type=trending_now&hours=24&count=25&countries=United States' where filename_tag = 'CovidArticles';

update buzz_query set query = 'https://api.buzzsumo.com/search/trends.json?topic=Black Lives Matter,BLM&search_type=trending_now&hours=24&count=25&countries=United States' where filename_tag = 'BLMArticles';

update buzz_query set query = 'https://api.buzzsumo.com/search/trends.json?topic=Election 2020,US Election,Election&search_type=trending_now&hours=24&count=25&countries=United States' where filename_tag = 'ElectionArticles';

update buzz_query set query = 'https://api.buzzsumo.com/search/articles.json?q=covid&num_days=365&result_type=evergreen_score&language=en' where filename_tag = 'EvergreenCovidArticles';

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
DROP TABLE IF EXISTS `update_job`;
CREATE TABLE `update_job` (
`id` int NOT NULL AUTO_INCREMENT,
`start_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`end_date` timestamp NULL DEFAULT NULL,
`finished` tinyint NOT NULL DEFAULT 0,
`elapsed_seconds` int null default 0,
`articles_buzz` integer default 0,
`articles_user` integer default 0,
`articles_updated` integer default 0,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=969 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

alter table buzz_query
add column
filename_tag varchar(20) null;

alter table buzz_query
add column
active_flag boolean;

insert into buzz_query
(id, query, filename_tag, active_flag)
values
(1, 'topic=coronavirus,covid&search_type=trending_now&hours=24&count=25&countries=United States', 'CovidArticles',true),
(2, 'topic=Black Lives Matter,BLM&search_type=trending_now&hours=24&count=25&countries=United States', 'BLMArticles',true),
(3, 'topic=Election 2020,US Election,Election&search_type=trending_now&hours=24&count=25&countries=United States', 'ElectionArticles',true)
;

alter table article
add column
filename_tag varchar(20) null;

insert into tag (id, tag) values (1, 'one'), (2, 'two'), (3, 'three');

insert into article_has_tag (id, tag_id, article_id) values (1, 1, 1), (2, 2, 1), (3, 3, 1);

update article set filename_tag = "CovidArticles" where id > 0;

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
alter table article
add column
submit_count int null;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
insert into buzz_query
(id, query, filename_tag, active_flag)
values
(4, 'https://api.buzzsumo.com/search/articles.json?q=covid&num_days=365&result_type=evergreen_score&language=en', 'EvergreenCovidArticles',true);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update buzz_query set query='q=covid&num_days=365&result_type=evergreen_score&language=en' where id = 4;
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
ALTER TABLE buzz_query CHANGE COLUMN filename_tag filename_tag text;
alter table article change column filename_tag filename_tag text;

insert into buzz_query
(id, query, filename_tag, active_flag)
values
(4, 'q=covid&num_days=365&result_type=evergreen_score&language=en', 'EvergreenCovidArticles',true);

update buzz_query set filename_tag = 'EvergreenCovidArticles' where filename_tag = 'EvergreenCovidArticl';

update buzz_query set query = 'https://api.buzzsumo.com/search/trends.json?topic=coronavirus,covid&search_type=trending_now&hours=24&count=25&countries=United States' where filename_tag = 'CovidArticles';

update buzz_query set query = 'https://api.buzzsumo.com/search/trends.json?topic=Black Lives Matter,BLM&search_type=trending_now&hours=24&count=25&countries=United States' where filename_tag = 'BLMArticles';

update buzz_query set query = 'https://api.buzzsumo.com/search/trends.json?topic=Election 2020,US Election,Election&search_type=trending_now&hours=24&count=25&countries=United States' where filename_tag = 'ElectionArticles';

update buzz_query set query = 'https://api.buzzsumo.com/search/articles.json?q=covid&num_days=365&result_type=evergreen_score&language=en' where filename_tag = 'EvergreenCovidArticles';


Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
insert into buzz_query
(id, query, filename_tag, active_flag)
values
(5, 'https://api.buzzsumo.com/search/trends.json?topic=coronavirus,covid&search_type=trending_now&hours=24&count=25&countries=United States', 'Covid2Articles',true);
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
insert into buzz_query
(id, query, filename_tag, active_flag)
values
(6, 'https://api.buzzsumo.com/search/trends.json?topic=coronavirus,covid&search_type=trending_now&hours=24&count=75&countries=United States', 'Covid2Articles',true);
Loading