Enabling FK support in SQLite with Firefox SQLite Manager

SQLite Manager is an awesome plugin for Firefox that lets you create & manage a SQLite db.

To enable FK support using SQLite Manager:

  • Go to DB Settings, change Foreign Keys to ‘On’, Press ‘Change’
  • Go to Tools, then ‘Use table for extension data’
  • Go to Tools, then ‘Open on-connect SQL’
  • Click on the ‘On connect SQL’ tab – the ‘On-connect SQL statements for THIS database’ textarea is now enabled.
  • In the field enter: PRAGMA foreign_keys=ON;
  • Press Save.

Syntax to create an FK ref:

<tt>CREATE TABLE child_table_name (field_1 INTEGER PRIMARY KEY,
field_2  TEXT,
foreign_key_field INTEGER ,
FOREIGN KEY(foreign_key_field)  REFERENCES parent_table_name(parent_key_field));</tt>

 

Cool new features in WordPress 3.1

WordPress really is the bomb. It’s everything I’ve ever wanted for hosting my own blog, and yet the new features keep coming. I’m loving the admin bar that appears across the top of the page when you’re logged in – makes it so much easier to jump into Dashboard features.

While I’m at it, not 3.1 related, but the Android app for WordPress is awesome too, letting me submit draft posts back to my site which I can pick up later when I’m back at a keyboard. Brilliant.