After reading Jonathan Stark's blog post Building The Perfect Testimonial
I decided to add such a feature to our kwilo app.
The user should be able to manage testimonials of his customers.
For this purpose, it should be possible to store the following data for a testimonial:
- The name of the person who gave the testimonial.
- The content of the testimonial itself.
- The date of the testimonial.
The customer should be able to specify whether the name of the person, the content, and the company logo may be used on the website or in social media.
In addition, it should be possible to define in which sources (e.g. website URLs) the testimonial is actively used.
Solution
Schema

Table customer {
id integer [primary key, not null, unique]
name char(255) [not null, unique]
}
Table testimonial {
id integer [primary key, not null, unique]
customer_id integer [not null, ref: > customer.id]
created_at date [not null]
// name and content can be both null if the customer does not provide the data
name char(255) [null]
content char(255) [null]
// permissions, keep it simple
is_name_usage_on_website_granted tinyint(1) [default: 0]
is_name_usage_on_social_media_granted tinyint(1) [default: 0]
is_content_usage_on_website_granted tinyint(1) [default: 0]
is_content_usage_on_social_media_granted tinyint(1) [default: 0]
is_logo_usage_on_website_granted tinyint(1) [default: 0]
is_logo_usage_on_social_media_granted tinyint(1) [default: 0]
}
// usage of th testimonial
Table testimonial_usage {
id integer [primary key, not null, unique]
testimonial_id integer [not null, ref: > testimonial.id]
// e.g. URL to website's page on which the testimonial is used
used_in longtext [not null]
}