PostgreSQL is a robust, open-source database engine with a sophisticated query optimizer and a slew of built-in capabilities, making it an excellent choice for production databases.
Basecamp 2 is a project management tool that allows you to manage all your tasks on one page, is lightning quick, and keeps you up-to-date in real-time.
It's easy to connect PostgreSQL + Basecamp 2 without coding knowledge. Start creating your own business flow.
Triggered when you add a new column.
Triggered when you add a new row.
Triggered when new rows are returned from a custom query that you provide. Advanced Users Only
Triggers when anything across any project happens. Use a filter step with this!
Triggers when something happens inside of Basecamp project. This trigger will give you a brief overview of the event that happened.
Triggers when a new event is added to a calendar.
Triggers when a new file is added to a project.
Triggers when a new person is available in the account.
Triggers when a new project is created.
Triggers when a new text document is added to a project.
Triggers when a new todo is added to a todo list.
Triggers when a new todo list is added.
Triggers when a new topic is added (A new message is a topic, and the first comment on Calendar Events, Uploads, and Todos are topics).
Adds a new row.
Updates an existing row.
PostgreSQL is a relational database management system (RDBMS. that implements the SQL standard. It is an object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions.
It has been developed since 1986 by a team led by Michael Stonebraker, who had previously designed Ingres. Many consider it the most advanced open-source database system in terms of performance and stability.
Basecamp is a project management and group cplaboration top. It allows users to organize projects into “projects”, manage tasks within each project, share files, and communicate with other members of the project through messages. All communication with members of a project is done via the project’s Basecamp “site”, which can also be password-protected. The company also offers a mobile app called Campfire for iPhone and iPad. In addition to providing file-sharing features, Campfire allows users to create and respond to topics or threads of discussion around specific items, organize these items into separate categories and delegate responsibility for managing these categories to others. The free version of Basecamp is limited to two projects and twelve members per project. Also, the free version limits file uploads to 100 MB per file. Paid plans are available with greater limits on file uploads and the number of projects allowed. As of June 2011, the paid versions offered by 37signals were for one project or organization with ten projects and 100 members for $24 per month or unlimited projects and unlimited members for $99 per month. The paid version also includes storage options from 5 GB up to 30 GB. The company also offers other services such as Campfire for group chat, Backpack for file sharing and Invoice for invoicing.
Through taking a look at the API documentation, we find that a Campfire object can be accessed using postgresql lib. In this way, we can create a new table in our database to store our firebase data. In the creation of this table, we need to take care of some things, such as the cpumn name, primary key setting, etc., so our table will look like this when it comes out:
CREATE TABLE campfire ( id INT PRIMARY KEY AUTOINCREMENT NOT NULL , messages_count INT NOT NULL , posts_count INT NOT NULL , attachments_count INT NOT NULL , user_id INT NOT NULL , name VARCHAR ( 255 ), email VARCHAR ( 255 ), avatar BLOB , created_at DATETIME NOT NULL );
Now that we have created our campfire table, we need to save the data from our firebase to our database in order to persist them after refreshing the page/tab. We will use the PgFire gem to help us do this work for us by creating a model to wrap our campfire table data as well as using the postgresql lib to interact with our database. The model looks like this:
class Campfire < ActiveRecord :. Base acts_as_list :includes => [ :project ] belongs_to :project belongs_to :user accepts_nested_attributes_for :project , allow_destroy. true def self . get_from (model. if model.instance_of?( Project . return model elsif model.instance_of?( User . return models.find(model.id. end end end
Now that we have created our model, we need to write some code that will transfer the data from firebase to our database through using PgFire gem and postgresql lib . First, we will use the get method on pgfire to retrieve the data from firebase:
# Connect to the server and then query for all of the messages # in firebase. q = PgFire . connection . get ( "https://your-app-url/firebase/posts" . . messages . get ( 0 . # Create a Campfire object from the message object (q. c = Campfire . get_from ( q . # Store the message into our campfire table with a project ID and # a user ID that reflects its Firebase ID. c . save! # Commit any changes made since #connect was called. PgFire . connection . commit!
The process to integrate PostgreSQL and Basecamp 2 may seem complicated and intimidating. This is why Appy Pie Connect has come up with a simple, affordable, and quick spution to help you automate your workflows. Click on the button below to begin.