remove versioning
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
class DropEntryVersions < ActiveRecord::Migration[8.1]
|
||||
def change
|
||||
drop_table :entry_versions do |t|
|
||||
t.text :changes_made
|
||||
t.string :change_type
|
||||
t.datetime :created_at, null: false
|
||||
t.integer :entry_id, null: false
|
||||
t.datetime :updated_at, null: false
|
||||
t.integer :user_id
|
||||
t.index [ :entry_id ], name: "index_entry_versions_on_entry_id"
|
||||
t.index [ :user_id ], name: "index_entry_versions_on_user_id"
|
||||
end
|
||||
end
|
||||
end
|
||||
+1
-9
@@ -16,15 +16,6 @@ FOREIGN KEY ("user_id")
|
||||
);
|
||||
CREATE INDEX "index_comments_on_user_id" ON "comments" ("user_id") /*application='SanastoWiki'*/;
|
||||
CREATE INDEX "index_comments_on_commentable" ON "comments" ("commentable_type", "commentable_id") /*application='SanastoWiki'*/;
|
||||
CREATE TABLE IF NOT EXISTS "entry_versions" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "entry_id" integer NOT NULL, "user_id" integer NOT NULL, "changes_made" json NOT NULL, "change_type" varchar, "created_at" datetime(6) NOT NULL, CONSTRAINT "fk_rails_be24c8cfa1"
|
||||
FOREIGN KEY ("entry_id")
|
||||
REFERENCES "entries" ("id")
|
||||
, CONSTRAINT "fk_rails_aaeb10db8b"
|
||||
FOREIGN KEY ("user_id")
|
||||
REFERENCES "users" ("id")
|
||||
);
|
||||
CREATE INDEX "index_entry_versions_on_entry_id" ON "entry_versions" ("entry_id") /*application='SanastoWiki'*/;
|
||||
CREATE INDEX "index_entry_versions_on_user_id" ON "entry_versions" ("user_id") /*application='SanastoWiki'*/;
|
||||
CREATE TABLE IF NOT EXISTS "supported_languages" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "code" varchar NOT NULL, "name" varchar NOT NULL, "native_name" varchar NOT NULL, "sort_order" integer DEFAULT 0 NOT NULL, "active" boolean DEFAULT TRUE NOT NULL, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL);
|
||||
CREATE UNIQUE INDEX "index_supported_languages_on_code" ON "supported_languages" ("code") /*application='SanastoWiki'*/;
|
||||
CREATE TABLE IF NOT EXISTS "users" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar NOT NULL, "password_digest" varchar NOT NULL, "name" varchar, "role" integer DEFAULT 0 NOT NULL, "primary_language" varchar, "invitation_token" varchar, "invitation_sent_at" datetime(6), "invitation_accepted_at" datetime(6), "invited_by_id" integer, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL, CONSTRAINT "fk_rails_ae14a5013f"
|
||||
@@ -90,6 +81,7 @@ BEGIN
|
||||
END;
|
||||
CREATE TABLE IF NOT EXISTS "setup_states" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "installed" boolean DEFAULT FALSE NOT NULL, "installed_at" datetime(6), "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL);
|
||||
INSERT INTO "schema_migrations" (version) VALUES
|
||||
('20260123125325'),
|
||||
('20260122131000'),
|
||||
('20260122130000'),
|
||||
('20260122124151'),
|
||||
|
||||
Reference in New Issue
Block a user