Skip to main content

Databases from the Future: What is Database Version 954?

 Have you started up a new Optimizely site, and prepared your database only get to this error message?



Reading the error message itself, you'll see that the created DB version is at 957 where the current version of Optimizely, at the time of this writing, is 904. 

Where did this come from?
How do I put my database in a time machine and bring it back to the present?

The good news on both parts of this manageable with a visit from Dr. Emmett Brown. The first question: "Where did this come from?" is a versioning issue. SQL Server 2022 (v16) will create future database if you simply run your database creation against a SQL 2022 instance. This will occur if your default instance is SQL 2022 regardless of how you go about generating your database. 

So, that's how it happens, now how do you create a database that is ready now, instead of a database from the far future? This is where Visual Studio and SQL Server Object Explorer come in handy. Visual Studio installs a database instance for itself, which you can see when you pull up the SQL Server Object Explorer:

You can already see from the screenshot that this is a SQL 2019 instance as it is v15. Right clicking this instance and selecting New Query will open up a new SQL command tab. Here it is a simple matter of running your creation script to create your blank database so Optimizely can configure it on startup.


 




Comments

Popular posts from this blog

Config-Per-Site in Multi-Tenant Environments

Recently, a task was given to me at work where we needed a multisite configuration. We all know that multi-environment is as easy as appsettings.<environment_name>.config. What about in multi-tenant environments? You can't have appsettings.site1.config and appsettings.site2.config in your site! Well, not without a little extra work... Allow me to introduce  AddKeyPerFile ; this handy little function that you set up in your Program.cs will enumerate the files in a directory and add them to your Configuration.  "Alright!" you must be thinking "Show me how this miracle function works..." Well, let's get to it! First, you'll want to identify the config sections that will be unique to each site and put them in their own folder. I do this by site name because it makes the most sense by our conventions, if something else works for your practice, these names aren't set in stone.  Now, in order to suck those values into your config, there's one simp

The 1001st Piece in your 1000 Piece Puzzle: .NET Default Interface Functions

I was recently working with a client who wanted a reasonably large subsystem added to Optimizely that would add automated management to their content. While cutting the code for this, I found myself writing similar code across multiple classes. The reason why I had to write it that way was: 1) The client was currently on CMS11 and didn't have access to newer language features; 2) The hierarchy of the classes prevented me from inserting a common ancestor. Thankfully, .NET has expanded the functionality of interfaces, so we can take advantage of those within Optimizely. With .NET 5, Microsoft introduced default implementations on interfaces. Now interfaces can bring along a default implementation. Resulting in all classes that implement the interface can use the default implementation or override it with custom logic. Enough text! Let's code! Original Interface The following code is something that we'd create for an Optimizely experiment: using OptimizelySDK; using Optimizely

You Just Got Vectored! SVG Image Formats

 If you're reading this, then you've come across a need that nearly all Opti developers encounter in their careers; You need to display a vector image format (SVGs and the like) properly, the <IMG> tag just isn't going to cut it anymore. Post like this are a right-of-passage for Opti bloggers. "So," you think "if there are so many other blogs out there on the topic, why should I read yours?" Firstly, you enjoy my familiar and conversational tone of writing. Cary Elwes does the English accent, I do the nerd stuff. Second, you've already come this far, you might as well finish as this point, it's not long, I promise. To that point, and most importantly, I've seen some complex solutions out there, this one is a quick and simple implementation. 100% Guarantee! The VectorFile class: [MediaDescriptor(ExtensionString = "svg")]     public class VectorFile : ImageData     {         public override Blob Thumbnail { get => BinaryData;