Open Source

MySQL: Dari Desain Ke Kode Lebih Mudah

Posted on

MySQL sebagai RDBMS open source, sangat mudah dijumpai pada server-server hosting atau di kalangan akademisi maupun korporat. Oracle sebagai pemilik MySQL juga mengembangkan aplikasi pendukung MySQL Workbench (dahulu MySQL GUI Tools). Fungsi utama MySQL Workbench adalah: Desain database (modelling). Administrasi Server. SQL Frontend untuk Database MySQL. MySQL Workbench sendiri dikembangkan secara open source, juga dapat diperluas fungsi-fungsinya dengan […]

symfony

Extending Propel in Symfony 1.4

Posted on

Allow Table name prefixed with underscore Replace the original symfony/lib/plugins/sfPropelPlugin/lib/addon/sfPropelDatabaseSchema.class.php: public function getChildren($hash) { foreach ($hash as $key => $value) { // ignore special children (starting with _) if ($key[0] == ‘_’) { unset($hash[$key]); } } return $hash; } with: public function getChildren($hash) { foreach ($hash as $key => $value) { // ignore special children […]

symfony

MySQL Workbench Plugin to Export Schema as Symfony Propel Schema

Posted on

MySQL Workbench provides DBAs and developers an integrated tools environment for: Database Design & Modeling SQL Development (replacing MySQL Query Browser) Database Administration (replacing MySQL Administrator) There are numerous MySQL Workbench plugin to export the MySQL schema into Propel, one is found here. This plugin export the schema into Propel xml schema. For a symfony […]

symfony

Propel 1.3 Blob Field Workarround on Symfony

Posted on

VARBINARY or LONGVARBINARY column should be mapped as blob column. But in Propel 1.3 they are mapped wrong. The setter for the column will not work when the column is saved, the column is treated as string instead of resource. The column value will be something like Resource id #nn. See this ticket. You can […]

symfony

Adding Access Logging to Symfony Application

Posted on

sfAccessLoggerPlugin introduces a way of logging your site visits. To accomplish this logging, the others plugin is needed: sfGuardPlugin for User management. sfPropelUuidBehaviorPlugin for generating Universally Unique Identifier (UUID). sfRemoteIPPlugin, an extract of function found in sfPropelAuditPlugin by Sacha Telgenhof Oude Koehorst to detect the remote IP Address. sfBrowscapPlugin, a simple symfony wrapper for phpbrowscap […]

symfony

Using Multiple Primary Keys in Admin Generator

Posted on

Sometimes, the table we’re using force us to use multiple primary keys as shown in the schema below (config/schema.yml): connection: propel defaultIdMethod: native package: lib.model classes: State: tableName: state columns: id: { type: varchar, size: 2, primaryKey: true } country_id: { type: varchar, size: 2, primaryKey: true } name: { type: varchar, size: 50, index: […]