If you ever get the following error:
The single-table inheritance mechanism failed to locate the subclass: 'link'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite Olink.inheritance_column to use another column for that information.
Make sure you don't have a field named type in your table.