Preventing accidental deletesΒΆ

>>> from lino import startup
>>> startup('lino_book.projects.docs.settings.doctests')
>>> from lino.api.doctest import *
>>> from lino.utils.diag import analyzer
>>> print(analyzer.show_foreign_keys())  
- concepts.Concept :
  - PROTECT : concepts.Link.child, concepts.Link.parent
- contacts.Company :
  - PROTECT : contacts.Role.company, system.SiteConfig.site_company
- contacts.CompanyType :
  - PROTECT : contacts.Company.type
- contacts.Partner :
  - CASCADE : contacts.Company.partner_ptr, contacts.Person.partner_ptr
  - PROTECT : polls.Response.partner, users.User.partner
- contacts.Person :
  - PROTECT : contacts.Role.person
- contacts.RoleType :
  - PROTECT : contacts.Role.type
- contenttypes.ContentType :
  - PROTECT : changes.Change.master_type, changes.Change.object_type, gfks.HelpText.content_type, notify.Message.owner_type, uploads.Upload.owner_type
- countries.Country :
  - PROTECT : contacts.Partner.country, countries.Place.country
- countries.Place :
  - PROTECT : contacts.Partner.city, contacts.Partner.region, countries.Place.parent
- polls.Choice :
  - PROTECT : polls.AnswerChoice.choice
- polls.ChoiceSet :
  - PROTECT : polls.Choice.choiceset, polls.Poll.default_choiceset, polls.Question.choiceset
- polls.Poll :
  - CASCADE : polls.Question.poll
  - PROTECT : polls.Response.poll
- polls.Question :
  - PROTECT : polls.AnswerChoice.question, polls.AnswerRemark.question
- polls.Response :
  - CASCADE : polls.AnswerChoice.response, polls.AnswerRemark.response
- uploads.UploadType :
  - PROTECT : uploads.Upload.type
- uploads.Volume :
  - PROTECT : uploads.Upload.volume
- users.User :
  - PROTECT : changes.Change.user, notify.Message.user, polls.Poll.user, polls.Response.user, tinymce.TextFieldTemplate.user, uploads.Upload.user, users.Authority.authorized, users.Authority.user