Дана Tuesday 14 September 2010 21:01:40 Dan Nessett написа: > Database schema: Add a "licensing" table to the db with the following > columns - 1) revision_or_image, 2) revision_id, 3) image_id, 4) > content_source, 5) license_id, 6) user_id. > > The first three columns identify the revision or image to which the > licensing data is associated. I am not particularly adept with SQL, so > there may be a better way to do this. The content_source column is a > string that is a URL or other reference that specifies the source of the > content under license. The license_id identifies the specific license for > the content. The user_id identifies the user that added the licensing > information. The user_id may be useful if a site wishes to allow someone > who added the licensing information to delete or modify it. However, > there are complications with this. Since IP addresses are easily spoofed, > it would mean this entry should only be valid for logged in users. > > Add a "license" table with the following columns - 1) license_id, 2) > license_text, 3) license name and 4) license_version. The license_id in > the licensing table references rows in this table.
How about a more generalised, more wiki solution? Instead of "licensing" table, use "revisionlinks" table that would track what revision of a page was linking to what revision of another page. rl_from: revision that is linking rl_from_page: page in which the revision was included rl_to: revision that is being linked to rl_to_page: page that is being linked to rl_type: template, category, article... You could then use this to find what revision of a template was linked by what revision of a page. If used for a license template, this would effectively track licenses. If this would be too database intensive, it could be used only for some pages (for example, only those with a specific magic word). _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
