Currently, we see different user experience on different DB backend when creating alarms.
On sqlalchemy, due to the foreign key constraints, an alarm can only be created if the corresponding user_id and project_id are existed in the DB, which means the alarm can NOT be created until a metering sample with the same user_id and project_id has been recorded in the DB.
However, on mongoDB, there is no such restriction. The alarm can be created whenever the user wants.
We should make different DB backends behave the same way.
method 1: drop sql foreign key constraints
method 2: in sqlalchemy implementation of alarm creation, create new user_id/project_id, just like what we does now in record_metering_data.
a heads up, if you drop foreign key constraints, you may need to update clear_expired_ metering_ data since i check for that there too.