1
0

ddl.go 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // Copyright 2014 beego Author. All Rights Reserved.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package migration
  15. // Table store the tablename and Column
  16. type Table struct {
  17. TableName string
  18. Columns []*Column
  19. }
  20. // Create return the create sql
  21. func (t *Table) Create() string {
  22. return ""
  23. }
  24. // Drop return the drop sql
  25. func (t *Table) Drop() string {
  26. return ""
  27. }
  28. // Column define the columns name type and Default
  29. type Column struct {
  30. Name string
  31. Type string
  32. Default interface{}
  33. }
  34. // Create return create sql with the provided tbname and columns
  35. func Create(tbname string, columns ...Column) string {
  36. return ""
  37. }
  38. // Drop return the drop sql with the provided tbname and columns
  39. func Drop(tbname string, columns ...Column) string {
  40. return ""
  41. }
  42. // TableDDL is still in think
  43. func TableDDL(tbname string, columns ...Column) string {
  44. return ""
  45. }