{"id":29,"date":"2015-04-13T15:16:00","date_gmt":"2015-04-13T13:16:00","guid":{"rendered":"https:\/\/daniel.liljeberg.io\/?p=29"},"modified":"2021-04-01T22:02:08","modified_gmt":"2021-04-01T20:02:08","slug":"database-tables-for-osclass-plugins-using-dlicore","status":"publish","type":"post","link":"https:\/\/daniel.liljeberg.io\/sv\/2015\/04\/13\/database-tables-for-osclass-plugins-using-dlicore\/","title":{"rendered":"Database Tables for Osclass plugins using dliCore"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">One thing that a lot of plugins wish to do is to save persistent data. This can be done in a number of ways. There are volatile ways like storing them in memory etc and non volatile ones like storing data to files, databases and similar. Since Osclass itself uses the MySQL&nbsp;database (probably works fine with Miranda DB to) a lot of plugins use this to store their data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As with most things, working with databases has had a \u201csemi official\u201d way established.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Most plugins tend to do things in the following way.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Define table structure<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The table structure is placed in a file. This is commonly named&nbsp;<em>struct.sql<\/em>&nbsp;but could be named anything. Here\u2019s a small mock-up of a table for storing some random extra data for a users profile.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">CREATE TABLE \/*TABLE_PREFIX*\/t_extendedprofile_data (\n    fk_i_user_id INT UNSIGNED,\n    i_data_type INT UNSIGNED NOT NULL,\n    s_data_text  VARCHAR(256) DEFAULT NULL,\n    PRIMARY KEY (fk_i_user_id),\n    FOREIGN KEY (fk_i_user_id) REFERENCES \/*TABLE_PREFIX*\/t_user (pk_i_id) ON DELETE SET NULL\n) ENGINE=InnoDB DEFAULT CHARACTER SET 'UTF8' COLLATE 'UTF8_GENERAL_CI';<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Osclass internally uses prefixes on column names to convey what type of data the&nbsp;column contains.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The comment&nbsp;<em>\/*TABLE_PREFIX*\/<\/em>&nbsp;will be automatically replaced with the prefix defined in the&nbsp;<em>config.php<\/em>&nbsp;file in the root folder of your Osclass installation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Some plugins have one table defined in the file, some have several, others have several files with one table in each file etc. For&nbsp;instance our&nbsp;<em>i_data_type<\/em>&nbsp;column might have a table with mapping between datatype id\u2019s and actual names. However, this could also be mapped in the PHP code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This file is then read and executed during plugin installations. I have seen several ways, but a common one is to call something like this in the plugins install function<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$path = osc_plugin_resource('userprofile\/struct.sql') ;\n        \t$sql = file_get_contents($path);\n\n        \tif(!$this->dao->importSQL($sql) ){\n        \t\tthrow new Exception( $this->dao->getErrorLevel().' - '.$this->dao->getErrorDesc() ) ;\n        \t}<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">DAO objects<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Most plugins then create their own&nbsp;<em>DAO<\/em>&nbsp;object by extending the&nbsp;<strong>DAO<\/strong>&nbsp;class of Osclass. I have also seen examples of plugins doing queries directly in their own functions (often contained in a very messy index.php file\u2026 hehe). I would suggest that you at least use the base&nbsp;<strong>DAO<\/strong>&nbsp;object in Osclass to communicate with your database since it handles a lot of work for you.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Extending it and making your own class is good if you want to encapsulate functions within it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If we for example wanted to get the data of a particular type for a given user you could have a function in your DAO object that looked something like this<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public function getUserData($userId, $dataType) {\n  $this->dao->select('s_data_text');\n  $this->dao->from( $this->getTable());\n  $this->dao->where('fk_user_id', $userId);\n  $this->dao->where('i_data_type', $dataType);\n\n  $result = $this->dao->get();\n\n  if( !$result) {\n    return null;\n  }\n\n  $row = $result->row();\n  if($row['s_data_text'] === null) {\n    return null;\n  }\n  return $row['s_data_text'];\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You would then build up more and more functionality and add more and more functions for what you needed to be able to do with your data.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Something to think about<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">There are some issues with this approach. Not really problems with Osclass itself, but things people should think about.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Most sites I have&nbsp;visited has has their&nbsp;<em>struct.sql<\/em>&nbsp;files visible. That means that anyone could type in the url to the struct file and view the layout. This could then be used to identify potential ways to&nbsp;compromise the site. Since most plugins use this common approach and naming scheme it\u2019s quite easy to locate schema files to view. You could \u201cfix\u201d this by editing your&nbsp;<em>.htaccess<\/em>&nbsp;file to not allow&nbsp;<em>.sql<\/em>&nbsp;files to be viewed. Something lite this should work.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;FilesMatch \"\\.sql\">\n    Order allow,deny\n    Deny from all\n    Satisfy All\n&lt;\/FilesMatch><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Also, passing data around as associative arrays makes it easy to introduce errors that go unnoticed until code is in production. If you use an IDE that gives you nice warnings about typos in function names etc, make sure you type your array keys correctly since it will not report errors in those \ud83d\ude42<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How you could do it using dliCore<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Since dliCore is all about encapsulating things and streamlining there&nbsp;is functionality in place to handle databases to. Instead of manually adding code to a plugins install and uninstall function to read and execute code to install the needed schemas dliCore let you define tables as classes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Defining a table in dliCore<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Our previous example table in a plugin named&nbsp;<em>extendedProfile&nbsp;<\/em>would be created something like this.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?php\nnamespace extendedProfile\\Table;\n\nuse dliLib\\Db\\AbstractTable;\nclass extendedProfileTable extends AbstractTable\n{\n    protected $_tableName = 't_userProfile';\n    \n    protected $_struct = \n    \"CREATE TABLE IF NOT EXISTS \/*TABLE_NAME*\/ (\n      fk_i_user_id INT UNSIGNED,\n      i_data_type INT UNSIGNED NOT NULL,\n      s_data_text  VARCHAR(256) DEFAULT NULL,\n      PRIMARY KEY (fk_i_user_id),\n      FOREIGN KEY (fk_i_user_id) REFERENCES \/*TABLE_PREFIX*\/t_user (pk_i_id) ON DELETE SET NULL\n    ) ENGINE=InnoDB DEFAULT CHARACTER SET 'UTF8' COLLATE 'UTF8_GENERAL_CI';\";\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Note that most look the same. But we use&nbsp;<em>\/*TABLE_NAME*\/<\/em>&nbsp;instead of&nbsp;<em>\/*TABLE_PREFIX*\/<\/em>. This is a new option in dliCore that will equate to&nbsp;<em>\/*TABLE_PREFIX*\/<\/em>&nbsp;plus the&nbsp;<em>$_tableName<\/em>&nbsp;of the table in question. This is mostly for convenience.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Since the struct is now part of the class it\u2019s not visible to&nbsp;a user trying to access it like it could have been in a&nbsp;<em>.sql<\/em>&nbsp;file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The&nbsp;<strong>AbstractTable<\/strong>&nbsp;base class contains functions to install and uninstall the table.&nbsp;We could add an optional function called&nbsp;<em>updateSchema&nbsp;<\/em>which will be called if a plugin is updated. It will in that case be passed the previously installed version and the newly installed one.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/**\n* Called on all registered tables when a Plugin is updated\n*\n* @param unknown $previousVersion\n* @param unknown $newVersion\n*\/\npublic function updateSchema($previousVersion, $newVersion) {\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In that function any alterations to lift a schema to new versions could be carried out.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Registering tables<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In order to have your table installed and uninstalled with a plugin (as well as notified when a plugin is updated) you register it with the plugin that is the owner of it. This&nbsp;can be done in your plugins&nbsp;<em>_init<\/em>&nbsp;function.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">class userProfilePlugin extends Plugin\n{\n  protected function _init() {\n    \/* Register Tables *\/\n    $this->_registerTable('userProfile\\Table\\userProfileTable', 'userProfile');\n  }\n\n...<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The&nbsp;<em>_registerTable<\/em>&nbsp;function is a member function of he&nbsp;<em>Plugin<\/em>&nbsp;class and takes either an instance of the table or the class name of the table and an internal name.&nbsp;Using the class name makes sure that no instance is created until it\u2019s needed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Any table registered with a plugin has their&nbsp;<em>installSchema<\/em>&nbsp;function called when the plugin is installed and their&nbsp;<em>uninstallSchema<\/em>&nbsp;function called when a plugin is uninstalled.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So adding a table to a dliCore based plugin is a matter of creating your table class like above and registering it with the plugin. The rest is done for you.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Accessing data<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Note that we didn\u2019t create any functions to access the data in our table class like we did in our DAO object. You could do this if you want to. As with most things in dliCore it\u2019s optional to use features or stick to the old school way of doing things. But another way to access and work with data objects is to use the dliCore&nbsp;<strong>dbModel<\/strong>&nbsp;class. I will talk more about that next time.<\/p>\n\t\t\t<input type=\"hidden\" id=\"wplinkpress-user-email\" value=\"\" \/>\n<input type=\"hidden\" id=\"wplinkpress-authorize-url\" value=\"https:\/\/www.linkedin.com\/oauth\/v2\/authorization?response_type=code&client_id=77uzug7iq2dnd2&redirect_uri=https%3A%2F%2Fdaniel.liljeberg.io%2Fauthorize-linkedin%2F&state=https%3A%2F%2Fdaniel.liljeberg.io%2Fsv%2Fwp-json%2Fwp%2Fv2%2Fposts%2F29&scope=r_liteprofile%20r_emailaddress%20w_member_social\" \/>\n<input type=\"hidden\" id=\"wplinkpress-post-id\" value=\"29\" \/>\n<div class=\"ui wplinkpress comments\">\n<h3 class=\"ui dividing header\">Comments<\/h3>\n<form id=\"add-wplinkpress-comment\" method=\"POST\"> \n<div class=\"comment add-comment\">\n\t<a class=\"avatar\"><img src=\"https:\/\/daniel.liljeberg.io\/wp-content\/plugins\/wplinkpress\/assets\/media\/non-user-icon.jpg\" \/><\/a>\n\t<div class=\"content\">\n\t<textarea id=\"wplinkpress-comment-text-0\" class=\"wplinkpress-comment-text\" style=\"width:100%;\" placeholder=\"Add a comment...\"><\/textarea>\n\t<div class=\"bottom-layer\">\n\t\t<div class=\"comment-atts\" style=\"float:left;\">\n\t\t\t\t<div class=\"feed-share\">\n\t\t<label class=\"switch tips\">\n\t\t\t<input type=\"checkbox\" id=\"toggle-linkedin-feed\" >\n        \t<span class=\"slider round\"><\/span>\n\t\t<\/label>\n\t\t<span>Share on activity feed<\/span>\n\t\t<\/div>\n\t\t<\/div>\n\t<div class=\"wplinkpress_buttons\">\n\t\t<button id=\"authorize_comment_0\" class=\"authorize_comment\" disabled=\"disabled\">Post with LinkedIn<\/button>\n\t\t<\/div>\n\t<\/div>\n\t<\/div>\n<\/div>\n<\/form>\n<h3 class=\"ui dividing header\"><span class=\"wplinkpress-brand\">Powered by WP LinkPress<\/span><\/h3>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>One thing that a lot of plugins wish to do is to save persistent data. This can be done in a number of ways. There are volatile ways like storing them in memory etc and non volatile ones like storing data to files, databases and similar. Since Osclass itself uses the MySQL&nbsp;database (probably works fine&hellip;&nbsp;<a href=\"https:\/\/daniel.liljeberg.io\/sv\/2015\/04\/13\/database-tables-for-osclass-plugins-using-dlicore\/\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Database Tables for Osclass plugins using dliCore<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","footnotes":""},"categories":[3,2],"tags":[],"class_list":["post-29","post","type-post","status-publish","format-standard","hentry","category-dlicore","category-osclass"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Database Tables for Osclass plugins using dliCore - Daniel Liljeberg<\/title>\n<meta name=\"description\" content=\"Defining database tables in dliCore based Osclass plugin.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/daniel.liljeberg.io\/sv\/2015\/04\/13\/database-tables-for-osclass-plugins-using-dlicore\/\" \/>\n<meta property=\"og:locale\" content=\"sv_SE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Database Tables for Osclass plugins using dliCore - Daniel Liljeberg\" \/>\n<meta property=\"og:description\" content=\"Defining database tables in dliCore based Osclass plugin.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/daniel.liljeberg.io\/sv\/2015\/04\/13\/database-tables-for-osclass-plugins-using-dlicore\/\" \/>\n<meta property=\"og:site_name\" content=\"Daniel Liljeberg\" \/>\n<meta property=\"article:published_time\" content=\"2015-04-13T13:16:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-04-01T20:02:08+00:00\" \/>\n<meta name=\"author\" content=\"Daniel Liljeberg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Skriven av\" \/>\n\t<meta name=\"twitter:data1\" content=\"Daniel Liljeberg\" \/>\n\t<meta name=\"twitter:label2\" content=\"Ber\u00e4knad l\u00e4stid\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minuter\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/daniel.liljeberg.io\\\/sv\\\/2015\\\/04\\\/13\\\/database-tables-for-osclass-plugins-using-dlicore\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/daniel.liljeberg.io\\\/sv\\\/2015\\\/04\\\/13\\\/database-tables-for-osclass-plugins-using-dlicore\\\/\"},\"author\":{\"name\":\"Daniel Liljeberg\",\"@id\":\"https:\\\/\\\/daniel.liljeberg.io\\\/#\\\/schema\\\/person\\\/e2c3fe10971c37cff2669f5688834cd7\"},\"headline\":\"Database Tables for Osclass plugins using dliCore\",\"datePublished\":\"2015-04-13T13:16:00+00:00\",\"dateModified\":\"2021-04-01T20:02:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/daniel.liljeberg.io\\\/sv\\\/2015\\\/04\\\/13\\\/database-tables-for-osclass-plugins-using-dlicore\\\/\"},\"wordCount\":1057,\"publisher\":{\"@id\":\"https:\\\/\\\/daniel.liljeberg.io\\\/#\\\/schema\\\/person\\\/e2c3fe10971c37cff2669f5688834cd7\"},\"articleSection\":[\"dliCore\",\"Osclass\"],\"inLanguage\":\"sv-SE\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/daniel.liljeberg.io\\\/sv\\\/2015\\\/04\\\/13\\\/database-tables-for-osclass-plugins-using-dlicore\\\/\",\"url\":\"https:\\\/\\\/daniel.liljeberg.io\\\/sv\\\/2015\\\/04\\\/13\\\/database-tables-for-osclass-plugins-using-dlicore\\\/\",\"name\":\"Database Tables for Osclass plugins using dliCore - Daniel Liljeberg\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/daniel.liljeberg.io\\\/#website\"},\"datePublished\":\"2015-04-13T13:16:00+00:00\",\"dateModified\":\"2021-04-01T20:02:08+00:00\",\"description\":\"Defining database tables in dliCore based Osclass plugin.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/daniel.liljeberg.io\\\/sv\\\/2015\\\/04\\\/13\\\/database-tables-for-osclass-plugins-using-dlicore\\\/#breadcrumb\"},\"inLanguage\":\"sv-SE\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/daniel.liljeberg.io\\\/sv\\\/2015\\\/04\\\/13\\\/database-tables-for-osclass-plugins-using-dlicore\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/daniel.liljeberg.io\\\/sv\\\/2015\\\/04\\\/13\\\/database-tables-for-osclass-plugins-using-dlicore\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/daniel.liljeberg.io\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Database Tables for Osclass plugins using dliCore\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/daniel.liljeberg.io\\\/#website\",\"url\":\"https:\\\/\\\/daniel.liljeberg.io\\\/\",\"name\":\"Daniel Liljeberg\",\"description\":\"The is no place like 127.0.0.1\",\"publisher\":{\"@id\":\"https:\\\/\\\/daniel.liljeberg.io\\\/#\\\/schema\\\/person\\\/e2c3fe10971c37cff2669f5688834cd7\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/daniel.liljeberg.io\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"sv-SE\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/daniel.liljeberg.io\\\/#\\\/schema\\\/person\\\/e2c3fe10971c37cff2669f5688834cd7\",\"name\":\"Daniel Liljeberg\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"sv-SE\",\"@id\":\"https:\\\/\\\/daniel.liljeberg.io\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/DanielLiljeberg.png\",\"url\":\"https:\\\/\\\/daniel.liljeberg.io\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/DanielLiljeberg.png\",\"contentUrl\":\"https:\\\/\\\/daniel.liljeberg.io\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/DanielLiljeberg.png\",\"width\":424,\"height\":440,\"caption\":\"Daniel Liljeberg\"},\"logo\":{\"@id\":\"https:\\\/\\\/daniel.liljeberg.io\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/DanielLiljeberg.png\"},\"description\":\"Agile practitioner and advocate. Strong believer in the future of agile organizations, businesses and teams. Got my first computer, a C64, at age 7 and computers has been part of my life since then. Working professionally with development since the early 2000\u2019s in a vast array of technologies and roles. Social, easy going, fun loving guy with an appetite for new challenges and new knowledge who has been \u201cthere\u201d and done \u201cthat\u201d. That\u2019s a good way to sum it all up. Married and father of three kids. All true blessings ;)\",\"sameAs\":[\"https:\\\/\\\/daniel.liljeberg.io\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/danielliljeberg\\\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Database Tables for Osclass plugins using dliCore - Daniel Liljeberg","description":"Defining database tables in dliCore based Osclass plugin.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/daniel.liljeberg.io\/sv\/2015\/04\/13\/database-tables-for-osclass-plugins-using-dlicore\/","og_locale":"sv_SE","og_type":"article","og_title":"Database Tables for Osclass plugins using dliCore - Daniel Liljeberg","og_description":"Defining database tables in dliCore based Osclass plugin.","og_url":"https:\/\/daniel.liljeberg.io\/sv\/2015\/04\/13\/database-tables-for-osclass-plugins-using-dlicore\/","og_site_name":"Daniel Liljeberg","article_published_time":"2015-04-13T13:16:00+00:00","article_modified_time":"2021-04-01T20:02:08+00:00","author":"Daniel Liljeberg","twitter_card":"summary_large_image","twitter_misc":{"Skriven av":"Daniel Liljeberg","Ber\u00e4knad l\u00e4stid":"7 minuter"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/daniel.liljeberg.io\/sv\/2015\/04\/13\/database-tables-for-osclass-plugins-using-dlicore\/#article","isPartOf":{"@id":"https:\/\/daniel.liljeberg.io\/sv\/2015\/04\/13\/database-tables-for-osclass-plugins-using-dlicore\/"},"author":{"name":"Daniel Liljeberg","@id":"https:\/\/daniel.liljeberg.io\/#\/schema\/person\/e2c3fe10971c37cff2669f5688834cd7"},"headline":"Database Tables for Osclass plugins using dliCore","datePublished":"2015-04-13T13:16:00+00:00","dateModified":"2021-04-01T20:02:08+00:00","mainEntityOfPage":{"@id":"https:\/\/daniel.liljeberg.io\/sv\/2015\/04\/13\/database-tables-for-osclass-plugins-using-dlicore\/"},"wordCount":1057,"publisher":{"@id":"https:\/\/daniel.liljeberg.io\/#\/schema\/person\/e2c3fe10971c37cff2669f5688834cd7"},"articleSection":["dliCore","Osclass"],"inLanguage":"sv-SE"},{"@type":"WebPage","@id":"https:\/\/daniel.liljeberg.io\/sv\/2015\/04\/13\/database-tables-for-osclass-plugins-using-dlicore\/","url":"https:\/\/daniel.liljeberg.io\/sv\/2015\/04\/13\/database-tables-for-osclass-plugins-using-dlicore\/","name":"Database Tables for Osclass plugins using dliCore - Daniel Liljeberg","isPartOf":{"@id":"https:\/\/daniel.liljeberg.io\/#website"},"datePublished":"2015-04-13T13:16:00+00:00","dateModified":"2021-04-01T20:02:08+00:00","description":"Defining database tables in dliCore based Osclass plugin.","breadcrumb":{"@id":"https:\/\/daniel.liljeberg.io\/sv\/2015\/04\/13\/database-tables-for-osclass-plugins-using-dlicore\/#breadcrumb"},"inLanguage":"sv-SE","potentialAction":[{"@type":"ReadAction","target":["https:\/\/daniel.liljeberg.io\/sv\/2015\/04\/13\/database-tables-for-osclass-plugins-using-dlicore\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/daniel.liljeberg.io\/sv\/2015\/04\/13\/database-tables-for-osclass-plugins-using-dlicore\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/daniel.liljeberg.io\/"},{"@type":"ListItem","position":2,"name":"Database Tables for Osclass plugins using dliCore"}]},{"@type":"WebSite","@id":"https:\/\/daniel.liljeberg.io\/#website","url":"https:\/\/daniel.liljeberg.io\/","name":"Daniel Liljeberg","description":"The is no place like 127.0.0.1","publisher":{"@id":"https:\/\/daniel.liljeberg.io\/#\/schema\/person\/e2c3fe10971c37cff2669f5688834cd7"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/daniel.liljeberg.io\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"sv-SE"},{"@type":["Person","Organization"],"@id":"https:\/\/daniel.liljeberg.io\/#\/schema\/person\/e2c3fe10971c37cff2669f5688834cd7","name":"Daniel Liljeberg","image":{"@type":"ImageObject","inLanguage":"sv-SE","@id":"https:\/\/daniel.liljeberg.io\/wp-content\/uploads\/2020\/12\/DanielLiljeberg.png","url":"https:\/\/daniel.liljeberg.io\/wp-content\/uploads\/2020\/12\/DanielLiljeberg.png","contentUrl":"https:\/\/daniel.liljeberg.io\/wp-content\/uploads\/2020\/12\/DanielLiljeberg.png","width":424,"height":440,"caption":"Daniel Liljeberg"},"logo":{"@id":"https:\/\/daniel.liljeberg.io\/wp-content\/uploads\/2020\/12\/DanielLiljeberg.png"},"description":"Agile practitioner and advocate. Strong believer in the future of agile organizations, businesses and teams. Got my first computer, a C64, at age 7 and computers has been part of my life since then. Working professionally with development since the early 2000\u2019s in a vast array of technologies and roles. Social, easy going, fun loving guy with an appetite for new challenges and new knowledge who has been \u201cthere\u201d and done \u201cthat\u201d. That\u2019s a good way to sum it all up. Married and father of three kids. All true blessings ;)","sameAs":["https:\/\/daniel.liljeberg.io","https:\/\/www.linkedin.com\/in\/danielliljeberg\/"]}]}},"_links":{"self":[{"href":"https:\/\/daniel.liljeberg.io\/sv\/wp-json\/wp\/v2\/posts\/29","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daniel.liljeberg.io\/sv\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daniel.liljeberg.io\/sv\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daniel.liljeberg.io\/sv\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/daniel.liljeberg.io\/sv\/wp-json\/wp\/v2\/comments?post=29"}],"version-history":[{"count":2,"href":"https:\/\/daniel.liljeberg.io\/sv\/wp-json\/wp\/v2\/posts\/29\/revisions"}],"predecessor-version":[{"id":31,"href":"https:\/\/daniel.liljeberg.io\/sv\/wp-json\/wp\/v2\/posts\/29\/revisions\/31"}],"wp:attachment":[{"href":"https:\/\/daniel.liljeberg.io\/sv\/wp-json\/wp\/v2\/media?parent=29"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daniel.liljeberg.io\/sv\/wp-json\/wp\/v2\/categories?post=29"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daniel.liljeberg.io\/sv\/wp-json\/wp\/v2\/tags?post=29"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}