Commit Graph

63 Commits

Author SHA1 Message Date
Kenneth Kehl
9b965ae6bf fix first paginate method 2024-10-18 12:40:14 -07:00
Kenneth Kehl
567a16fb53 fix first paginate method 2024-10-18 12:23:51 -07:00
Kenneth Kehl
2b1e83cef6 fix first paginate method 2024-10-18 12:12:20 -07:00
Kenneth Kehl
a3b2b19406 fix first paginate method 2024-10-18 11:55:30 -07:00
Kenneth Kehl
5e8efacdb8 fix first paginate method 2024-10-18 11:33:59 -07:00
Kenneth Kehl
73dbca16e1 fix first paginate method 2024-10-18 11:18:29 -07:00
Kenneth Kehl
c859c5c53a fix first paginate method 2024-10-18 11:03:21 -07:00
Kenneth Kehl
697ea84d32 fix first paginate method 2024-10-18 10:44:56 -07:00
Kenneth Kehl
f12f6b9b63 fix first paginate method 2024-10-18 10:27:29 -07:00
Kenneth Kehl
fed5a842e0 fix first paginate method 2024-10-18 10:16:09 -07:00
Kenneth Kehl
5716c86e8a fix first paginate method 2024-10-18 10:03:46 -07:00
Kenneth Kehl
cf3e99c801 fix first paginate method 2024-10-18 09:50:06 -07:00
Kenneth Kehl
001c16bdce fix first paginate method 2024-10-18 09:40:37 -07:00
Kenneth Kehl
f207b65c9a fix first paginate method 2024-10-18 09:31:12 -07:00
Kenneth Kehl
c36a1ba221 fix first paginate method 2024-10-18 09:21:04 -07:00
Kenneth Kehl
3b651a2716 fix first paginate method 2024-10-18 09:05:03 -07:00
Kenneth Kehl
78aab59d15 fix first paginate method 2024-10-18 08:45:31 -07:00
Kenneth Kehl
fdc494e561 fix delete 2024-10-18 08:12:22 -07:00
Kenneth Kehl
ea32db8df3 revert pagination fix 2024-10-17 14:28:22 -07:00
Kenneth Kehl
be56461587 fix delete_inbound_sms_older_than_retention and dao_get_inbound_sms_by_id 2024-10-17 14:17:00 -07:00
Kenneth Kehl
6f29a0e5a4 fix delete_inbound_sms_older_than_retention and dao_get_inbound_sms_by_id 2024-10-17 14:05:03 -07:00
Kenneth Kehl
3c3fb8eb3a fix delete_inbound_sms_older_than_retention and dao_get_inbound_sms_by_id 2024-10-17 13:52:25 -07:00
Kenneth Kehl
cfce20fb46 fix delete_inbound_sms_older_than_retention and dao_get_inbound_sms_by_id 2024-10-17 13:39:05 -07:00
Kenneth Kehl
80d05532e7 fix delete_inbound_sms_older_than_retention and dao_get_inbound_sms_by_id 2024-10-17 13:22:41 -07:00
Kenneth Kehl
dd4bf2abd3 fix delete_inbound_sms_older_than_retention and dao_get_inbound_sms_by_id 2024-10-17 13:10:02 -07:00
Kenneth Kehl
af22cbcab9 start InboundSmsDao 2024-10-17 12:58:35 -07:00
Kenneth Kehl
0f1d70f593 start InboundSmsDao 2024-10-17 12:44:28 -07:00
Kenneth Kehl
672fb364ec start InboundSmsDao 2024-10-17 12:36:26 -07:00
Kenneth Kehl
608f1ec3a3 start InboundSmsDao 2024-10-17 12:27:17 -07:00
Kenneth Kehl
c818bac288 start InboundSmsDao 2024-10-17 12:24:23 -07:00
Aditi Anand
ad55eef5e9 Changes for sqlalchemy 2.0 2024-04-24 16:27:20 -04:00
Cliff Hill
3982f061b6 Made enums.py for all the enums to avoid cyclic imports.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2024-02-28 12:43:31 -05:00
Cliff Hill
43f18eed6a More changes for enums.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2024-02-28 12:41:57 -05:00
Cliff Hill
820ee5a942 Cleaning up a lot of things, getting Enums used everywhere.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2024-02-28 12:40:52 -05:00
Kenneth Kehl
1ecb747c6d reformat 2023-08-29 14:54:30 -07:00
Rebecca Law
68d28aa83b The update of SQLAlchemy 1.4.10 has caused some conflicts in our code. This PR fixes most of those conflicts.
- sqlalchemy.sql.expression.case must include an else statement.
- clearly define list of columns for inbound_sms_history insert, getting the list from InboundSmsHistory.__table__.c was causing data type errors.
- remove relationships when not needed, the foreign key relationship is established in the creation of the column. This will get rid of the warnings referenced here: http://sqlalche.me/e/14/qzyx.
- update queries now that he user relationship in ServiceUser db model has been removed.
- move the check that a template is archived to the view instead of the dao method. The check was clearing the session before the version history could be done.

Deleting notifications in the night tasks still needs to be
investigated. The raw sql is causing an error.
2021-04-29 13:32:36 +01:00
Rebecca Law
85895a9e8b Revert "Scheduled weekly dependency update for week 16" 2021-04-28 10:17:16 +01:00
Rebecca Law
1b070d69a1 The update of SQLAlchemy 1.4.10 has caused some conflicts in our code. This PR fixes most of those conflicts.
- sqlalchemy.sql.expression.case must include an else statement.
- clearly define list of columns for inbound_sms_history insert, getting the list from InboundSmsHistory.__table__.c was causing data type errors.
- remove relationships when not needed, the foreign key relationship is established in the creation of the column. This will get rid of the warnings referenced here: http://sqlalche.me/e/14/qzyx.
- update queries now that he user relationship in ServiceUser db model has been removed.
- move the check that a template is archived to the view instead of the dao method. The check was clearing the session before the version history could be done.

Deleting notifications in the night tasks still needs to be
investigated. The raw sql is causing an error.
2021-04-26 11:50:30 +01:00
Rebecca Law
d4009ffc52 Rename database management functions.
Rename @transactional to @autocommit.
Rename nested_transaction to tranaction.
2021-04-19 10:56:00 +01:00
Ben Thorner
a91fde2fda Run auto-correct on app/ and tests/ 2021-03-12 11:45:45 +00:00
Pea Tyczynska
9c4205c7c6 Remove statsd decorators from dao functions
This done so that we do not use statsd on our http endpoint.
We decided we do not need metrics that this gave us. If we
change our minds, we will add Prometheus-friendly decorators
instead in the future.
2020-07-07 18:02:24 +01:00
David McDonald
f948555ca8 Do nothing on db conflict
For notification and notification_history we do an upsert. Here, as the
inbound_sms table is never updated, only inserted to once (signified by
lack of updated_at field), an upsert would be unnecessary.

Therefore, if for some reason the delete statement failed as part of
moving data into the inbound_sms_history table, we can simply just
ignore any db conflicts raised by a rerun of
`delete_inbound_sms_older_than_retention`.
2019-12-24 09:39:06 +00:00
Pea Tyczynska
f8ff2d121f Changes following review:
- Check if right keys in new history rows
- Improve model and get rid of old revision version
- Add updated migration file
- Test data when inserting into inbound sms history
2019-12-20 16:17:27 +00:00
Pea Tyczynska
448cd1e94e Integrate inbound history insert into delete inbound sms function 2019-12-20 16:16:29 +00:00
Pea Tyczynska
a6b4675ae7 Populate inbound sms history when deleting inbound sms 2019-12-20 16:16:29 +00:00
Leo Hemsted
cf248a2af3 combine post + get inbound, and make them respect data retention
also removed the limit/limit_days args as they're not used by admin
2019-03-28 15:38:26 +00:00
Leo Hemsted
97110e293b make inbound sms page respect data retention
also, it should default to last 7 days, not last 6 days. also change
count_inbound_sms to have the days passed in, so that it's more
explicit at the endpoint that we only return 7 days regardless of your
service's data retention
2019-03-27 17:47:26 +00:00
Leo Hemsted
7683e340cc get all inbound sms should default to 7 days, not 6
to be consistent with other checks.
2019-02-28 15:28:13 +00:00
Leo Hemsted
b4d1a590b7 rename days_ago_to_start to limit_days
consistency with the rest of the app
2019-02-28 13:59:59 +00:00
Leo Hemsted
88303140ec give dao_get_inbound_sms_for_service optional day limit
defaults to 6 to preserve backwards compatibility
2019-02-27 17:17:35 +00:00