Category: hook_schema()

Create a Simple Custom Entity

This lesson demonstrates the bare minimum needed to create a custom entity type and to load an Entity from the database. We’ll look at implementing a minimum viable hook_entity_info, talk about...

Using Schema Module

The Schema module is a great tool when working with databases. You can use it to inspect your site's database, to see if there are changes, and to...

Adding a table to the database

In this chapter we learn how to create a new database table. This example walks through creating a module that defines the the properties of our new table and also programatically creating that...

Lullabot logo

Lullabot has trained thousands of Drupal developers & guided the development of some of the largest Drupal websites.