Rebecca Law
25a1b7f31c
Firetext does not have a status code for temporary-failure.
...
In order to set a message as temporary-failure, we check if it is in pending status first.
Otherwise a delivery receipt for failure is set to permanent failure.
2016-05-26 16:46:00 +01:00
Rebecca Law
a0b974f4ac
Remove the status from the group by clause of the update statement.
...
This script has been applied to all environments except live, this can be pushed through to live without issue because of how alembic works.
2016-05-25 09:13:32 +01:00
Rebecca Law
dff60175a4
Add jobs.notifications_delivered and jobs.notifications_failed counts to the jobs table.
2016-05-23 15:44:57 +01:00
Rebecca Law
e0864dfdb5
Data migration script to fix templates_history.updated_at.
...
There was a bug that was not setting the updated_at for the history table.
2016-05-20 15:56:07 +01:00
Nicholas Staples
0fe0c1d2b4
Added job row number to the notification for csv jobs. All tests passing.
2016-05-19 10:46:03 +01:00
Nicholas Staples
6e7383de33
Removed template subject uniqueness
2016-05-18 10:00:09 +01:00
Rebecca Law
191a79f27b
Add new failure status for notifications.
2016-05-17 13:06:08 +01:00
Rebecca Law
8be3997bcf
Merge branch 'master' into tech-failures
2016-05-17 12:05:48 +01:00
Rebecca Law
49db4e81d5
Add new notification status types for technical_failure, temporary_failure, permanent_failure
2016-05-17 11:46:28 +01:00
Adam Shimali
682ea55d9e
[WIP] save reply to email address on service
2016-05-17 10:56:02 +01:00
Rebecca Law
992f9d78f9
There is a problem where columns on the templates table were not set.
...
It is also discovered that columns that have a default value and use the version mixin must set the value when creating the db object before the insert otherwise the history table will be missing the default value.
Updated the templates_history.created_by_id with a value where missing, using the current version of the template for this value.
Update templates_history.archived to false. This is okay as we do not yet have a way to set this value to true.
Removed the versions attribute from the TemplateSchema, there is not a need for this column.
2016-05-16 16:16:14 +01:00
Rebecca Law
a346eb2b19
Add a update query to fix templates_history where the created_by_id is missing.
2016-05-16 09:55:11 +01:00
Rebecca Law
894ec80e0e
fix db migration to use the right previous version
2016-05-13 16:44:06 +01:00
Rebecca Law
faff5fff55
Merge branch 'master' into add-template-version
2016-05-13 16:32:57 +01:00
Rebecca Law
917110870d
Use the template version at the time the notification is created or at the time the job is created.
...
Update notifications/sms|email endpoint to send the template version to the queue.
Update the process_job celery talk to send the template version to the queue.
When the send_sms|send_email task runs it will get the template by id and version.
Created a data migration script to add the template_vesion column for jobs and notifications.
The existing jobs and notifications are given the template_version of the current template.
There is a chance this is the wrong template version, but deemed okay since the application is not live.
Create unit test for the dao_get_template_versions method.
Rename /template/<id>/version to /template/<id>/versions which returns all versions for that template id and service id.
2016-05-13 16:25:05 +01:00
Martyn Inglis
06bfe81329
Load testing client added
2016-05-12 10:46:35 +01:00
Rebecca Law
c8c0f95dd2
Merge branch 'master' into add-template-version
...
Conflicts:
tests/app/dao/test_notification_dao.py
2016-05-12 09:49:35 +01:00
Rebecca Law
cc9fcb42d9
Migration script to add template version to jobs and notifications.
2016-05-12 09:22:35 +01:00
Martyn Inglis
668f311a1a
Merge branch 'primary-provider' of github.com:alphagov/notifications-api into primary-provider
2016-05-11 15:26:21 +01:00
Martyn Inglis
5c0dae9586
Added twilio into rebuilding the provider enum
2016-05-11 15:25:45 +01:00
Rebecca Law
5858861bb2
Remove constraints from downgrade so that it will work.
2016-05-11 14:15:53 +01:00
Martyn Inglis
6493e4db9c
Made the downgrades work
2016-05-11 12:56:28 +01:00
Martyn Inglis
b8a3e4a972
default priorities now in 10s not 1s
2016-05-11 09:37:50 +01:00
Martyn Inglis
57e05feafb
Updated the Provider stats and rates DAO objects to query based on the identifier in the ProviderDetails object.
...
- updated all tests
- changed teardown to leave provider details rows on end of individual tests
2016-05-06 09:09:47 +01:00
Martyn Inglis
fedbb27ffd
Database changes to enable the new provider details table
...
- this will contain details as too which clients / notification types / priority etc for each delivery partner.
BREAKING CHANGE.
this pull request is ONLY the db changes. Everything is likely to break in the API until the code is updated.
2016-05-05 09:55:25 +01:00
Adam Shimali
c2d3e021cc
Fix migration name clash
2016-04-27 11:48:46 +01:00
Adam Shimali
f71b626089
Merge pull request #267 from alphagov/events
...
Endpoint for recording events in api.
2016-04-27 11:37:33 +01:00
Adam Shimali
dacbbfbf2f
Endpoint for recording events in api.
...
An event has an id, a type and a blob of json attached.
2016-04-27 10:36:59 +01:00
Rebecca Law
94aab20317
Add created_by_id to jobs table.
...
The user logged in will be the user marked as creating the job.
The admin code already sends the created_by user when creating a job.
2016-04-26 16:15:34 +01:00
Nicholas Staples
e6cc3b1724
Added functionality to archive a template.
...
Renamed migration file.
2016-04-26 10:11:18 +01:00
Nicholas Staples
cec582e73d
Fix migration.
2016-04-25 13:57:55 +01:00
Nicholas Staples
b56e324a4c
Working tests and provider stats table.
...
Fix for tests and import error.
Added tests and updated for code review comments.
2016-04-25 12:20:06 +01:00
Adam Shimali
74ac5b5f30
Added version history to api keys. This needed a bit of change
...
to create history to handle foreign keys better. There may yet
be a better way of doing this that I have not found yet in sqlalchemy
docs.
2016-04-21 14:47:58 +01:00
Nicholas Staples
3b1423a2ea
Provider Statistics added.
...
Rates command added with a test.
Updated to include added migration.
2016-04-21 13:47:04 +01:00
Adam Shimali
054d8baa0a
Changed notifications stats day column to date type from string.
2016-04-20 15:38:06 +01:00
Adam Shimali
8ea8bba612
Fix migration downgrade
2016-04-19 17:13:26 +01:00
Adam Shimali
a6a18c1a6f
This approach uses part of sqlalchemy example history_meta code
...
adapted to recording inserts and updates.
This removes need to manually create history tables.
Our code still remains in control of when history records are
created.
2016-04-19 17:13:26 +01:00
Nicholas Staples
f681d40366
Character count added and tests passing.
...
Remove sql restriction for count to not be null.
2016-04-15 16:31:13 +01:00
Nicholas Staples
90f0505a3d
Update limit to message_limit.
...
Further db changes and updates.
Remove traceback print out.
Fix bug in passing template id to a task.
2016-04-11 16:53:40 +01:00
Nicholas Staples
c4b316bde6
Rebased migrations, all tests working.
2016-04-08 13:34:54 +01:00
Nicholas Staples
143d1b0db8
Updated to retrieve csv upload from new bucket.
...
Fix test errors.
2016-04-07 14:10:30 +01:00
Adam Shimali
3057641e40
Change sort order for templates from name to date using full timestamp
...
so that it would be most recently used at top.
2016-04-06 14:30:13 +01:00
Adam Shimali
ca9c886c3e
[WIP] On create of notification. Upsert record for template stats
...
recording usages of template by day.
2016-03-31 15:57:50 +01:00
Rebecca Law
7ec1f31bab
Fix sql, db user on preview does not have access to delete from pg_enum
2016-03-30 12:30:17 +01:00
Rebecca Law
c7c845cea6
Remove access_developer_docs as a permission type. It does not make sense to have permission for viewing the documentation.
...
On the downgrade method of the db script the assumption that all users with manage_api_keys had the access_developer_docs permission.
2016-03-29 17:00:42 +01:00
Rebecca Law
376a074f5f
Add view_activity permission so that users can have the default permission to see activity.
...
Add view_activity to default permissions when adding a new user.
Add view_activity as a permission group, used when inviting a user.
2016-03-29 15:35:34 +01:00
Rebecca Law
b0c6a1a7c6
Fix the order for the migration script
2016-03-17 11:50:32 +00:00
Rebecca Law
bd26c4740c
Merge branch 'master' into default-stats-to-zero
2016-03-17 11:40:49 +00:00
Rebecca Law
b7f65feadd
Set default to 0 for the notification_statistics table.
2016-03-17 11:32:55 +00:00
Rebecca Law
bd2d77fec8
Add platform_admin boolean on the User data model.
2016-03-17 10:37:24 +00:00