Content-type: text/html Downes.ca ~ Stephen's Web ~ A New Website, Part Twelve - Node Fields

Stephen Downes

Knowledge, Learning, Community

Dec 05, 2006

Well... I've been working on posts and have noticed that the whole Drupal database has changed form as I've added content types. Here's what the node tables look like now:

node
node_access
node_comment_statistics
node_content_article
node_content_author
node_content_event
node_content_journal
node_content_post
node_content_quote
node_counter
node_data_field_author
node_data_field_crdate
node_data_field_description
node_data_field_email
node_data_field_event
node_data_field_id
node_data_field_link
node_field
node_field_instance
node_revisions
node_type_content

So what's happening? Node data always gets entered into node and node_revisions, as before. But for content types, one of two things happens.

If a content field, such as 'description', is used in two or more content types, then a special data table, node_data_field_description, is created for that field, and the data stored there.

Otherwise, the data is stored in a field reserved for the data type itself, such as node_content_post.

No great disaster, I'm just glad I found this out now. It means some changes to the script, nothing major.

I also discovered that my post database is 17 megabytes large. To load it, I saved it as an SQL file, uploaded by FTP, then ran the command:

mysql -u username -p databasename < post.sql

Worked like a charm.



Stephen Downes Stephen Downes, Casselman, Canada
stephen@downes.ca

Copyright 2024
Last Updated: Dec 15, 2024 4:38 p.m.

Canadian Flag Creative Commons License.

Force:yes