Skip to content

Commit

Permalink
Fix for new databases, language field was still being added to snippe…
Browse files Browse the repository at this point in the history
…ts when it should be in the fragment
  • Loading branch information
jordan-dalby committed Nov 11, 2024
1 parent d147d8b commit 668deca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/src/components/snippets/SnippetStorage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Snippet } from '../../types/types';
import { initializeMonaco } from '../../utils/languageUtils';
import ShareMenu from './share/ShareMenu';

const APP_VERSION = "1.5.0";
const APP_VERSION = "1.4.1";

const SnippetStorage: React.FC = () => {
const { snippets, isLoading, addSnippet, updateSnippet, removeSnippet, reloadSnippets } = useSnippets();
Expand Down
2 changes: 1 addition & 1 deletion server/src/config/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ function createInitialSchema(db) {
CREATE TABLE IF NOT EXISTS snippets (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT NOT NULL,
language TEXT NOT NULL,
description TEXT,
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
Expand All @@ -142,6 +141,7 @@ function createInitialSchema(db) {
snippet_id INTEGER NOT NULL,
file_name TEXT NOT NULL,
code TEXT NOT NULL,
language TEXT NOT NULL,
position INTEGER NOT NULL,
FOREIGN KEY (snippet_id) REFERENCES snippets(id) ON DELETE CASCADE
);
Expand Down

0 comments on commit 668deca

Please sign in to comment.