Thread:Talk:Files and licenses concept/Authors

Currently the concept is to store the following per set in mw_file_props: mw_file_props contains: fp_id		INT (mw_revision.rev_fileprops_id is a key to this column) fp_key		VARBINARY(255) fp_value_int	INT fp_value_text	VARBINARY(255)

EXAMPLE This file has three authors: Krinkle, Catrope (attributed as Roan) and John Doe (not a wiki user). And is dual licensed.

What we totally forgot in this structure is attribution and url. So instead of adding a useless extra column like fp_string2 and fp_string3, it's best to move this away to a mw_author table.

mw_file_props contains: fp_id		INT (mw_revision.rev_fileprops_id is a key to this column) fp_key		VARBINARY(255) fp_value_int	INT

mw_author contains: author_id		PRIMARY AUTO INCREMENT author_user		INT (mw_user.user_id is a key to this column - it's NULL if author is not a wiki user) [1] author_name		VARBINARY(255) (if author is wiki user this is NULL, we get username from user table 				(saves space and saves changes when username would change) [1]	author_attribution	VARBINARY(255) (if author is wiki user this may be NULL (in which case attribution falls				back to 'user_real_name' or 'user_name';				but it may be filled in if users want a custom attribution eg. "Team X / Krinkle") either way this is the field that licenses will cite when requiring attribution (eg. photographer could hand rights to museum author is John Doe, attribution is Museum X) [1] author_url		VARBINARY(255) [2]

UNIQUE(author_name, author_attribution, author_url) [1]: Front-end requires an author to be given. atrribution and url are optional. When saving MediaWiki checks if author is a wiki username. If so, it uses it's id as author_user, and NULL for author_name, otherwise it saves the string as author_name and NULL in author_name

[2]: url is optional, but if account is wiki user and no value is here it fallsback to userpage.

EXAMPLE This file has three authors: Krinkle, Catrope (attributed as Roan) and John Doe (not a wiki user, hire by museum, hands over rights). And is dual licensed.

Roan didn't see anything bad in it, and the idea came from Bryan. If by tomorrow we dont see anything wrong with this I'd say... let's write it!