Jump to content
Mark
 Share


4.0 Developer Center - Database Schema Management

When developing, modifying the database schema (such as adding a column to a table) can be surprisingly time consuming. Currently, we have to:

  • Make the change locally
  • Change the installer
  • Add the query to make the change to the upgrader for whatever version we're working on
  • Let the other developers know so they can run the query to make the change in their installs.


This can cause issues, especially at the last step - we currently use a large .sql file in the trunk directory of our repository which we add queries to that we need everyone else to run - sometimes, one of us doesn't notice this has been updated. I'm sure also, third party modification authors are familiar with this annoyance.


In 4.0, one of the things I really wanted to do was build a central "Developer Center" from which both us and modification authors can manage aspects of the application without digging into installer/upgrader files, XML files and manually copying and pasting things when creating a new module or extension.

Part of this developer centre is a GUI for modifying the database schema. When you make changes, the changes will automatically be ran against your local database and added into the installer and upgrader. Internally, we'll also then have a special script which runs when we SVN update to copy these changes over when another developer makes a change.


The first page in the Database Schema Management will be a list of tables:


You can add a table to the list either by creating a new table, importing a table which is already in the database or uploading a .sql file containing a CREATE TABLE statement:




When you edit a table, you can manage the columns, indexes and rows which are inserted by default:


If you try to edit a table and your local database does not match what the schema has, you'll be shown the conflicts:




This, plus the other features in the Developer Center, which we'll talk about in later blog entries, make the process of developing applications easier for both us, and third party authors.




Fun fact: I'm writing this blog entry from the home of IPS in Lynchburg, VA rather than my usual office in the UK :smile:
 Share

Comments

Recommended Comments

VERY nice.

 

 

Little feature request that comes to mind..  When viewing the columns, be able to drag-and-drop them.  At least when IN_DEV is on, in case there is any importance for the columns to appear in a certain order.

 

 

Not sure about this wording though (import existing table)..

"it will be renamed and a RENAME TABLE statement made will be added to the upgrade routine"

I think it would sound better without the word, "made" in there.

 

 

 

Fun fact: I'm writing this blog entry from the home of IPS in Lynchburg, VA rather than my usual office in the UK  :smile:

-waves-  Howdy neighbor!

 

 

This has me thinking of another request, but indirectly related to what is shown here.  So I'll post it in the feedback forum. :smile:

 

 

Edit:  FIRSTIES!

Link to comment
Share on other sites

in case there is any importance for the columns to appear in a certain order.

If one's application code explicitly depends on a specific order of database columns in a table, one is definitively doing it dead wrong.

Very, very nice Mark... I spy admin/front modules centralized there and version management outside the hard xml. :D

Curious as ungodly about 'extensions' now.:P

Link to comment
Share on other sites

Is IPS 4 a complete rebuild, ore based on the 3.x source code? This isn't really clear to me, since the skin is still the same.

 

Everything showed in this blog entry, and all the underlying code to build it, apart from about 200 lines of CSS, is new. But when we start copying over features which existed in 3.x, we will definitely start with that code as a base and refactor as we go.

 

 

http://community.invisionpower.com/blog/1174/entry-8650-ips-social-suite-40/

 

"While 4.0 will not technically be a "complete rewrite", most of the underlying codebase will be rewritten in some manner, and all of the code will at least be updated to work within the new framework we are developing."

Link to comment
Share on other sites

Very excited to see this and kinda wiping up the pools of drool thinking about the other features of the Developer Center.  Hugely excited about the future 3rd party dev capabilities that have been shown/implied in these Dev Channel posts.  We've been repeatedly stymied in our attempts to migrate our biggest site off vB by an absurd chain of events that rendered our house unsuitable for human habitation for 18 months and counting, but it looks like some good may come from the ongoing insurance/contractor disaster.  If it keeps going long enough we may just be moving straight to 4.0! :)

 

We've learned to find the good in bad events, and IPS 4.0 is totally looking like one of the brass rings for us.  Our thanks for all you and the rest of the crew are doing Mark.

 

Mostly On Topic, will it be possible to dig around in the schema via the DB schema management?  Or will we still need to use Navicat/Coda2/insert-db-admin-tool-of-pref?  I don't mean in depth, but being able to check field names etc in the ACP would be handy.  It sort of looks like some of that might be there based on the edit schema screenshot above, just curious if there is anything already there for quick schema/data query planned?

 

James (of James and Susan) 
 

Link to comment
Share on other sites

Mostly On Topic, will it be possible to dig around in the schema via the DB schema management?  Or will we still need to use Navicat/Coda2/insert-db-admin-tool-of-pref?  I don't mean in depth, but being able to check field names etc in the ACP would be handy.  It sort of looks like some of that might be there based on the edit schema screenshot above, just curious if there is anything already there for quick schema/data query planned?

ACP, Support, you have Database Checker and Database Index Checker, which not only tell you if there are any issues but also list some of the information.  You can also go to the SQL Toolbox, click on a table name and see the schema for that table there.  (Clicking on the number for the number of rows lets you browse the actual data.)
 

Link to comment
Share on other sites

Mostly On Topic, will it be possible to dig around in the schema via the DB schema management?  Or will we still need to use Navicat/Coda2/insert-db-admin-tool-of-pref?  I don't mean in depth, but being able to check field names etc in the ACP would be handy.  It sort of looks like some of that might be there based on the edit schema screenshot above, just curious if there is anything already there for quick schema/data query planned?

 

James (of James and Susan) 
 

 

If you're in developer mode, yes. I'm also hoping we'll publish schema documentation.

Link to comment
Share on other sites

By the way: Will I.P. release 4.0 this year? Would be nice to know!

They'll release it "When It's Ready™" If it's ready this year, then it'll be released this year. Otherwise, it won't be. Simple as that.
Link to comment
Share on other sites

They'll release it "When It's Ready™" If it's ready this year, then it'll be released this year. Otherwise, it won't be. Simple as that.

 

Ah so it'll be released next month? Sweet ;) *Totally joking btw*

Link to comment
Share on other sites

By the way: Will I.P. release 4.0 this year? Would be nice to know!

 

4.0 is a big change. It would be amazing if it was released in 2013, but I personally don't think it will be ready that quickly.

Link to comment
Share on other sites

Part of this developer centre is a GUI for modifying the database schema. When you make changes, the changes will automatically be ran against your local database and added into the installer and upgrader. Internally, we'll also then have a special script which runs when we SVN update to copy these changes over when another developer makes a change.

Does this mean, that really everything will be saved in the filesystem and we can use git/svn and that ther's a way in the core to syncronize everything via a git/svn hook?

 

This means => NO manuall addon / or addon data import for colabrating addon developers?

Link to comment
Share on other sites

Does this mean, that really everything will be saved in the filesystem and we can use git/svn and that ther's a way in the core to syncronize everything via a git/svn hook?

 

This means => NO manuall addon / or addon data import for colabrating addon developers?

 

Yes :)

Link to comment
Share on other sites



Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...