مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-12-01 05:43:04 +00:00
add method for cleaning the message database
هذا الالتزام موجود في:
@@ -63,6 +63,18 @@ module Postal
|
|||||||
@database.query("DROP TABLE `#{@database.database_name}`.`#{table_name}`")
|
@database.query("DROP TABLE `#{@database.database_name}`.`#{table_name}`")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#
|
||||||
|
# Clean the database. This really only useful in development & testing
|
||||||
|
# environment and can be quite dangerous in production.
|
||||||
|
#
|
||||||
|
def clean
|
||||||
|
['clicks', 'deliveries', 'links', 'live_stats', 'loads', 'messages',
|
||||||
|
'raw_message_sizes', 'spam_checks', 'stats_daily', 'stats_hourly',
|
||||||
|
'stats_monthly', 'stats_yearly', 'suppressions', 'webhook_requests'].each do |table|
|
||||||
|
@database.query("TRUNCATE `#{@database.database_name}`.`#{table}`")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
# Creates a new empty raw message table for the given date. Returns nothing.
|
# Creates a new empty raw message table for the given date. Returns nothing.
|
||||||
#
|
#
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم