YAFLogo

Caffreys
  • Caffreys
  • 53.6% (Neutral)
  • YAF Forumling Topic Starter
16 years ago
Hi,

I'm using v1.9.3, ASP.Net 3.5 with my own asp membership provider.

Is there a SQL script available to drop/uninstall all the YAF Forum objects?

I've been having a problem with my installation, and wish to reinstall - however, if i visit http://localhost/forum/install, it doesn't allow me to start from scratch and reinstall. It reinstalls all the SQL objects, but doesn't take me through to the Create Administrator logic that it did on the first install. Is there a flag somewhere that I need to change to perform a new setup?

I want to re-set up my admin user accounts etc.

I figured that deleting some of the DB objects would force it to realise that I wanted to reinstall but alas no. Surely the YAF developers have some kind of Rollback / remove YAF SQL script, to allow them to start from scratch during development?

Thanks in advance for any help you can give me on this!

Sponsor
appliedtechtx
16 years ago
You should be able to use the ASP.NET configuration wizard from inside Visual Studio to edit your Users/Roles--even with a custom membership/role provider. Security>>>Add or Manage Users

But...if you don't care about your data...

WARNING: YOU CAN AND WILL EXPERIENCE A LOSS OF SERVICE/BREAK IN FUNCTIONALITY! Make sure you have your data backed up and know how to restore it beforehand! I am NOT responsible for your level of genius, stupidity or insanity! I make NO WARRANTIES on this advice, it is provided as-is. Caveat Lector...(Reader beware).

This assumes that your forum database is actually a separate database file!

That Said! :cheesy:

1. Make a backup copy of your database in another folder...(both the .mdf and .ldf(log file)).

1a. Detach your database/delete the original (.mdf/.ldf) file.

2. Find your "configuration password" in your "app".config file, delete it--there should only be quotes.

3. Create a new db file in the exact location with the exact name and access settings as before.

4. Go to install/default.aspx...should bring up the "fresh install" process.

5. Follow the onscreen prompts...

6. Restore your data from the backed up .mdf file...

Caffreys
  • Caffreys
  • 53.6% (Neutral)
  • YAF Forumling Topic Starter
16 years ago
Thanks for your help mate - however the problem is that the Yaf forum is installed alongside my other SQL objects. I have since rebuilt my membership provider and the users that were related to YAF have been deleted - hence my need to start from scratch.

However, I do not want to have to rebuild my database from scratch or have to restore from an earlier backup. I just want to remove all the YAF objects and reinstall.

I have tried following some of your instructions, by removing the Configuration password in the App.config however, it just sets it up again and goes directly to:

"Setup/Upgrade Finished

Your forum has now been setup or upgraded to the latest version."

Well ... I can assure you it hasn't!! Where did the user setup dialogue go - why can't i get it back? Something somewhere (SQL or Codebase) has a 'flag' stored that tells the code that the Forum is already set up. I need someone who knows where that flag is, so that I can remove it and perform a fresh install.

Surely someone has wanted to uninstall YAF from their database at sometime? Surely the developers have a script that does this?

Caffreys
  • Caffreys
  • 53.6% (Neutral)
  • YAF Forumling Topic Starter
16 years ago
Never mind - have solved it myself :)

I've writted a SQL script that cleans the database of all the YAF objects, and that has allowed me to reinstall it :-d

Guess there must have been something left in the SQL that was preventing it reinstalling.

Happy days 😎

test2005
16 years ago
A little late....but you could have written a script that looks for anything starting with "yaf_" (which is the databaseobjectqualifier setting in app.config) and drops it.


.....the man in black fled across the desert..........and the gunslinger followed.....

appliedtechtx
16 years ago
Yeah...that was gonna be the next thing I was gonna suggest...after you said "alongside my other dbo's" (same .mdf file...however you call it)

Also, going through the original "app.config" file from the source(bin/src versions both), i believe just deleting the configuration key is the "trigger" for the install process. At least its what comments were first in the app.config file before the install/default.aspx cleans em out

the_menace
16 years ago

Never mind - have solved it myself :)

I've writted a SQL script that cleans the database of all the YAF objects, and that has allowed me to reinstall it :-d

Guess there must have been something left in the SQL that was preventing it reinstalling.

Happy days 😎

Caffreys wrote:

Do you or does anybody have the script to clean up the YAF objects and constraints?

the_menace
16 years ago
Nevermind, I wrote a script and posted it in the general section of the forums.