Author Topic: Deleting all baselines from a repository in one go  (Read 5678 times)

adepreter

  • EA User
  • **
  • Posts: 187
  • Karma: +10/-9
    • View Profile
Deleting all baselines from a repository in one go
« on: February 08, 2016, 07:39:30 pm »
What is the most effective way to delete all baselines from the repository in one go.

Is all baseline information stored ONLY in the t_document table (where t_document.ElementID = t_package.ea_guid) ?

Thanks

Alain

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Deleting all baselines from a repository in one go
« Reply #1 on: February 08, 2016, 08:02:10 pm »
Alain,

I believe it is indeed only stored in the t_document, but it is not the only thing that is stored in that table.
So you'll have to make sure that your selection is precise enough to delete ONLY the baselines.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Deleting all baselines from a repository in one go
« Reply #2 on: February 08, 2016, 09:39:11 pm »
Code: [Select]
DELETE FROM t_document WHERE ElementType="Baseline"should do. See p. 28 of my Inside book.

q.

adepreter

  • EA User
  • **
  • Posts: 187
  • Karma: +10/-9
    • View Profile
Re: Deleting all baselines from a repository in one go
« Reply #3 on: February 11, 2016, 02:24:55 am »
Thank you very much! I guess you meant DocType and not ElementType.

DELETE FROM t_document WHERE DocType="Baseline"

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Deleting all baselines from a repository in one go
« Reply #4 on: February 11, 2016, 02:44:51 am »
Yes. It looks like I need to clarify the according paragraph in my book ;D

q.