Data Structure
The database structure for the template
All objects and some selected fields in the template are explained below. Please refer to our Bubble Best Practices document for guidance on how the Bubble database should be structured.
All data types and a few select fields are explained below. A good general rule to follow is that you shouldn't delete any fields that are included with the template and instead only add new ones.
Block entry
This data type is used to store content that goes into each homepage block. Each homepage block (template) will have a maximum number of block entries:
Testimonials section: Multiple entries
Featured section: Up to 3 entries
Process section: Up to 3 entries
Slideshow section: Between 3 to 5 entries
Capabilities section: Up to 9 entries
Video section: 1 entry
Press section: Between 3 to 5 entries
About section: 1 entry
Call-to-action section: 1 entry
Contact section: 0 entries
Comments
This data type represents a reply that can be made to a Post
or another Comment
. Comments
contain text and must be created by a logged in user. Comments
can be edited by the original author or app admins.
Field name
Type
Description
Delete?
yes / no
Indicates whether the comment has been deleted
Edits
Edit (List)
The list of Edits
made for the comment. A new Edit
is created each time a user modifies the comment
Most recent edit
Edit
The most recent Edit
made for the comment. This is used for the edit indication display in the comments UI
Parent comment
Comment
The Comment
that this comment is a reply to. If this field is populated, the Post
field should be empty
Post
Post
The Post
that is comment is a reply to. If this field is populated, the Comment
field should be empty
Text
text
The text - and primary content - of the comment
Tier
number
The tier of the comment. This value should be either 1, 2, or 3. Comments which are a direct reply to a Post
have a Tier
of 1. Comments which are a reply to a tier 1 comment have a Tier
of 2. Comments which are a reply to a tier 3 comment have a Tier
of 3
Upvotes
Users (List)
The list of Users
that have upvoted the comment
Upvotes (num)
number
The numeric count of users that have upvoted the comment. This field is used for sorting purposes
Dummy
This data type allows you to quickly preview your page layout by it as your data source.
Edit
This data type represents and edit that was made to either a Post
or Comment
. Edits
can be made by the original author of the Post
/ Comment
or app admins. Edits
track each aspect of the Post
/ Comment
that was modified. A history of Edits
is maintained in the database for reference purposes. Additionally, the Edit
object is used to indicate in the UI if/when a Post
or Comment
was edited.
Field name
Type
Description
Change (image)
image
The resulting Image
of the Post
after the edit has been made
Change (text)
text
The resulting Text
of the Post
or Comment
after the edit has been made
Change (title)
text
The resulting Title
of the Post
after the edit has been made
Comment
Comment
The Comment
that has been edited. If this field is populated, the Post
should be empty
Post
Post
The Post
that has been edited. If this field is populated, the Comment
should be empty
Feature backlog
This data type represents each feature that an Owner has added into the Backlog section of the Owner's Portal.
Flag
This data type is created each time a user chooses to flag (i.e., report) a Post
or Comment
. This may or may not include a message. Only app admins can view flags.
Field name
Type
Comment
Comment
The Comment
that the user has flagged
Dismissed?
yes / no
Indicates whether or not this Flag
has been reviewed by an admin. Flags
with their Dismissed?
field set to yes are not shown in the list of flags in the owner’s portal
Post
Post
The Post
that the user has flagged
Reason
text
The explanation for flagging the review. This is viewable only to admins in the owner’s portal. The Reason
is included optionally
Homepage block template
The data type is used for the homepage maker. App owners can add any number of homepage blocks / homepage sections straight from the owner's portal by starting from a homepage block template.
Homepage block
App Owners can add an unlimited number of homepage blocks. They can control the content and settings from the Owner's Portal.
Message
This data type represents a single message within a message thread. A Message
is created each time a user sends a message in the chat module.
Field name
Type
Attachment
file
The file that the message author has attached to the message. This is optional
Text
text
The content of the message
Thread
Thread
The overall message thread that this message is associated with. A Message
will always have one Thread
Users
Users (List)
The list of users who are involved with this message’s Thread
. This field is used for setting privacy rules
Viewed by users
Users (List)
The list of users who have viewed this message in the chat module. This allows you to determine which messages are unread
Palette color
This data type is color palette list is referenced in the Air Color Picker plugin / element. Feel free to add more color entries for quick access when using the Air Color Picker element.
Post
This data type represents a Post
created on the platform. Posts
contain a title, text, and optional image. They can be edited by the original Post
Author
or app admins.
Field name
Type
Description
Author
User
The User
that created the post
Comments
Comment (List)
The list of replies that have been created for the post
Edits
Edit (List)
The list of Edits
made for the post. A new Edit
is created each time a user modifies the post
Image
image
The optional image added for the post
Most recent edit
Edit
The most recent Edit
made for the post. This is used for the edit indication display in the posts UI
Post
text
The main text and primary content of the post
Timestamp
date
The date that the post was originally created
Title
text
The title of the post
Upvotes
User (List)
The list of Users
that have upvoted the post
Upvotes (num)
number
The numeric count of users that have upvoted the post. This field is used for sorting purposes
Push token
We use this data type for push notifications when we turn your app into a native mobile iOS or Android app.
Thread
This data type represents a message thread between two users. All messages sent within this thread are linked to this thread. A Thread
is created when one user messages another user (if a thread between the two does not already exist).
Field name
Type
Description
Inactive?
yes / no
Indicates whether the message thread is active and viewable
Last msg sent
date
The date and time of the most recently created message for this thread
Users
User (List)
The list of users who are involved with and have access to this thread. In this app, this field should always contain two users
User
The user data type represents each person who has an account in your application.
Field name
Type
Description
Date agreed to terms and privacy docs
date
Date agreed to terms and privacy docs during sign up
Inactive
yes / no
User is marked as inactive = yes when App owner deletes the user from the Owner's Portal
Last login
date
Captures the last date that the user loaded any page in the app
Owner?
yes / no
If Owner is yes then they will have access to the Owner's Portal
Signup method
text
E.g., E-mail, LinkedIn, Facebook, Twitter, or etc.
Website
This data type includes fields for all app-wide settings. Most of the data fields are controlled by the App Owner from the Owner's portal. There should only be a single object of this data type.
Field name
Type
Description
Ask for cookies?
yes / no
App Owner can control whether or not to ask users to accept cookies (if yes, a cookies banner will show on the homepage)
text
Contact / support email that all emails in the application come from. Whenever a new email action is created in the application, it should refer to this field instead of being hardcoded
Email HTML
text
Used in the SendGrid API call for "send emails" that generates a nicely-formatted HTML email
List of blocks
List of homepage blocks
Homepage blocks / sections
Name
text
Name of your app / website. This is the field that should be referenced anywhere where the name is used (instead of hardcoded).
Primary color
text
App and email template primary color
Usersnap off?
yes / no
This turns off the Usersnap tool, which AirDev uses with its clients to submit feedback and bug reports.
Last updated
Was this helpful?