nojima / carbon Goto Github PK
View Code? Open in Web Editor NEWA Wiki System
A Wiki System
内部的なデータ構造は、git のデータ構造を真似る。すなわち
blob
- ページの内容を保持するオブジェクト。タイトルとタグもこれが持つ。tree
- blob
の集合を保持するオブジェクト。名前は要検討。commit
- ある時点でのフォルダを表すオブジェクト。tree
を持つ。reference
オブジェクトを定義する。したがって、スキーマは以下のようになる:
CREATE TABLE commits (
id INTEGER NOT NULL,
user_id INTEGER NOT NULL REFERENCES users (id) ON DELETE RESTRICT,
created_at DATETIME NOT NULL,
parent1_id INTEGER,
parent2_id INTEGER,
message TEXT,
PRIMARY KEY (id, folder_id)
);
CREATE TABLE blobs (
id INTEGER NOT NULL,
document_id INTEGER NOT NULL REFERENCES documents (id) ON DELETE RESTRICT,
title TEXT NOT NULL,
content TEXT NOT NULL,
PRIMARY KEY (id, folder_id)
);
CREATE TABLE documents (
id INTEGER NOT NULL,
PRIMARY KEY (id, folder_id)
);
CREATE TABLE tags (
id INTEGER NOT NULL,
name VARCHAR(255) NOT NULL,
PRIMARY KEY (id, folder_id)
);
CREATE TABLE links (
commit_id INTEGER NOT NULL REFERENCES commits (id) ON DELETE CASCADE,
blob_id INTEGER NOT NULL REFERENCES blobs (id) ON DELETE CASCADE,
PRIMARY KEY (commit_id, blob_id, folder_id)
);
CREATE TABLE taggings (
blob_id INTEGER NOT NULL REFERENCES blobs (id) ON DELETE CASCADE,
tag_id INTEGER NOT NULL REFERENCES tags (id) ON DELETE CASCADE,
PRIMARY KEY (blob_id, tag_id, folder_id)
);
CREATE TABLE references (
id INTEGER NOT NULL,
folder_id INTEGER NOT NULL REFERENCES folders (id) ON DELETE CASCADE,
commit_id INTEGER NOT NULL REFERENCES commits (id) ON DELETE CASCADE,
name VARCHAR(255) NOT NULL,
PRIMARY KEY (id, folder_id)
);
Scalariform を使うとコードのフォーマットを統一してくれるらしいので sbt から使えるようにしたい。
現在、Bootstrap の CSS や JavaScript は、webapp
の下に直接置かれているが、これだと Bootstrap のバージョン管理がやりづらい。
なので別のディレクトリにして submodule などで管理する。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.