Commit dceca8d0 authored by 神楽坂玲奈's avatar 神楽坂玲奈

数据库迁移

git-svn-id: http://glupx.googlecode.com/svn/trunk/Reliz@71 189f022a-1064-8ae2-3e6f-c4a67275c50b
parent 5d63a7f8
<%= form_tag :controller => :topics do %> <%= form_tag :controller => :topics do %>
<p> <p>
<%= @board.id %> <%= @board.id %>
<%=t 'topic.title' %><%= text_field_tag "topic[name]" %> <%=t 'topic.title' %><%= text_field_tag "topic[name]" %>
</p> </p>
<p> <p>
<%= text_area_tag "post[content]" %> <%= text_area_tag "post[content]" %>
</p> </p>
<%= hidden_field_tag "topic[category_id]", @board.id %> <%= hidden_field_tag "topic[category_id]", @board.id %>
<%= hidden_field_tag "topic[category_type]", :board %> <%= hidden_field_tag "topic[category_type]", :board %>
<%= submit_tag t("topic.submit") %> <%= submit_tag t("topic.submit") %>
<% end %> <% end %>
\ No newline at end of file
...@@ -10,9 +10,10 @@ development: ...@@ -10,9 +10,10 @@ development:
reconnect: false reconnect: false
database: reliz database: reliz
pool: 5 pool: 5
username: zh99998-test username: zh99998
password: zh99998 password: zh99998
host: bbs.66rpg.com host: lab.66rpg.com
port: 3309
encoding: utf8 encoding: utf8
# Warning: The database defined as "test" will be erased and # Warning: The database defined as "test" will be erased and
......
class CreateBoards < ActiveRecord::Migration class CreateBoards < ActiveRecord::Migration
def self.up def self.up
create_table :boards do |t| create_table :boards do |t|
t.string :name :default => '', :null => false t.string :name, :default => '', :null => false
t.text :introduction :default => '', :null => false t.text :introduction, :default => '', :null => false
t.text :notice :default => '', :null => false t.text :notice, :default => '', :null => false
t.string :logo :default => '', :null => false t.string :logo, :default => '', :null => false
t.string :banner :default => '', :null => false t.string :banner, :default => '', :null => false
t.integer :readperm :default => 0, :null => false t.integer :readperm, :default => 0, :null => false
t.integer :topicperm :default => 0, :null => false t.integer :topicperm, :default => 0, :null => false
t.integer :postperm :default => 0, :null => false t.integer :postperm, :default => 0, :null => false
#t.reference : #t.reference :
t.timestamps t.timestamps
......
...@@ -13,14 +13,14 @@ ...@@ -13,14 +13,14 @@
ActiveRecord::Schema.define(:version => 20111036031160) do ActiveRecord::Schema.define(:version => 20111036031160) do
create_table "boards", :force => true do |t| create_table "boards", :force => true do |t|
t.string "name" t.string "name", :default => "", :null => false
t.text "introduction" t.text "introduction", :null => false
t.text "notice" t.text "notice", :null => false
t.string "logo" t.string "logo", :default => "", :null => false
t.string "banner" t.string "banner", :default => "", :null => false
t.integer "readperm" t.integer "readperm", :default => 0, :null => false
t.integer "topicperm" t.integer "topicperm", :default => 0, :null => false
t.integer "postperm" t.integer "postperm", :default => 0, :null => false
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
end end
...@@ -83,8 +83,8 @@ ActiveRecord::Schema.define(:version => 20111036031160) do ...@@ -83,8 +83,8 @@ ActiveRecord::Schema.define(:version => 20111036031160) do
t.integer "user_id", :null => false t.integer "user_id", :null => false
t.integer "type_id" t.integer "type_id"
t.integer "category_id", :null => false t.integer "category_id", :null => false
t.string "category_type", :default => "", :null => false t.string "category_type", :null => false
t.string "name", :default => "", :null => false t.string "name", :null => false
t.boolean "digest", :default => false, :null => false t.boolean "digest", :default => false, :null => false
t.integer "displayorder", :default => 0, :null => false t.integer "displayorder", :default => 0, :null => false
t.integer "highlight", :default => 0, :null => false t.integer "highlight", :default => 0, :null => false
...@@ -99,9 +99,9 @@ ActiveRecord::Schema.define(:version => 20111036031160) do ...@@ -99,9 +99,9 @@ ActiveRecord::Schema.define(:version => 20111036031160) do
end end
create_table "users", :force => true do |t| create_table "users", :force => true do |t|
t.string "name", :default => "", :null => false t.string "name", :null => false
t.string "nickname", :default => "", :null => false t.string "nickname", :default => "", :null => false
t.string "password", :default => "", :null => false t.string "password", :null => false
t.string "email", :default => "", :null => false t.string "email", :default => "", :null => false
t.integer "usergroup_id", :default => 0, :null => false t.integer "usergroup_id", :default => 0, :null => false
t.integer "admingroup_id", :default => 0, :null => false t.integer "admingroup_id", :default => 0, :null => false
...@@ -120,6 +120,8 @@ ActiveRecord::Schema.define(:version => 20111036031160) do ...@@ -120,6 +120,8 @@ ActiveRecord::Schema.define(:version => 20111036031160) do
t.integer "credit6", :default => 0, :null => false t.integer "credit6", :default => 0, :null => false
t.integer "credit7", :default => 0, :null => false t.integer "credit7", :default => 0, :null => false
t.integer "credit8", :default => 0, :null => false t.integer "credit8", :default => 0, :null => false
t.string "locale"
t.string "theme"
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
end end
......
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50150
Source Host : localhost:3306
Source Database : reliz
Target Server Type : MYSQL
Target Server Version : 50150
File Encoding : 65001
Date: 2011-04-24 14:37:18
*/
SET FOREIGN_KEY_CHECKS=0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment